- The Complete Enhanced Teamplay - v0.93 A QuakeC Mod By John Spickes What's New: 4/6/97 v0.93 -- QW 1.5 port and partial rewrite by Myrkul (myrkul@myrkul.org). Fixed an old bug that could allow teams to become uneven. Added a feature to kill players who try to leave with less than a certain number of frags. Added teamName and skin enforcement, necessary for QW. 8/17/96 v0.92 -- Teams are now persistent across level changes. This fixed some problems with players being fragged several times when enterring the game or new levels. Changed MOTD to use a new self.flags field instead of the old .motd entity float. 8/6/96 -- Added Ugly MOTD functionality, motd.qc. Added strict coop option. (edit teamplay.qc to toggle) 8/4/96 -- Fixed a bug that would allow players to gain infinite ammo by repeatedly dropping and picking up weapons in coop play. You now only get ammo from weapons when TEAM_DROP_ITEMS is off. 8/3/96 v0.91 -- Added dropping backpacks and weapons. 7/31/96 v0.9 -- I've just completed coding of the TeamLock and Static Team features. Looks like we're just about ready for first release. This version is still a little quirky, but I think it's workable enough for playtesting on team servers out there. Description: The Complete Enhanced Teamplay is a QuakeC mod which is intended to provide a great deal of flexibility in teamplay settings. I've retained all of the original functionality of Quake v1.01 and my previous Enhanced Teamplay, and added many more features. My aim is to have lots of useful teamplay options which the server can select at will, while minimizing my modification to the original QuakeC code. The options included in this release are: * Players' health can be protected from friendly fire damage * Players' armor can be protected from friendly fire damage * Damage inflicted to teammates can be mirrored on the attacker * Frags can be deducted for the killing of teammates * Players can be killed for killing their teammates * Players can be required to use only colors specified by the server * Players can be prohibited from changing teams * Players can be allowed to drop ammo and weapons * Players can be booted when they get a certain number of negative frags * Players can be killed on attempted exit if they have too few frags All these options can be turned on and off individually. Installation: To run a server using this mod, you need the registered version of Quake and the QuakeC compiler. The compiler can be obtained from ID Software or from www.stomped.com. To install the mod, copy the included source files over the originals from the qcc distribution and compile. See the instructions with the compiler for more information on how to use modified qc code. Teamplay feature use: A lot of options can be configured with this mod. The majority of these options are configurable using the teamplay variable. This mod uses the teamplay variable as a bitfield, with each bit associated with a different teamplay option. The bits are as follows: 1 Health Protect Players receive no health damage from teammates' attacks. 2 Armor Protect Players receive no armor damage from teammates' attacks. 4 Damage to Attacker A player who attacks his teammate will receive the same damage the teammate would have received, had he not been protected. 8 Frag Penalty Any player who kills his teammate will be penalized frags. The number of frags to penalize is adjustable by a simple edit in the teamplay.qc file. 16 Death Penalty Any player who kills his teammate will burst apart in a bloody mess. 32 Team Color Lock Players will only be allowed to be certain colors. Team colors can be specified for up to four teams in the teamplay.qc file. Players who have illegal colors when they enter will be put into the team with the fewest members. Any player who changes team (pants color) will be fragged and their frag count is reset to zero. 64 Static Teams Players will not be allowed to change teams. 128 Drop Items Players will be allowed to drop ammo and weapons. IMPULSE 20 will drop a backpack and IMPULSE 21 will drop the current weapon. You can't drop the axe or single-shotgun. 256 Boot Negs Boots players who get too many negative frags. Useful on servers that allow friendly fire with negative frags for killing teammates, to prevent server abuse. 512 Frag Minimum Players who attempt to exit the level with less than a certain number of frags are killed. Obviously, not all these options make sense together. teamplay 9 doesn't really make sense, because you couldn't ever kill a teammate, and thus you could never incur the one frag penalty. To select multiple options, add the numbers of the options together. Examples: teamplay 96 Team Color Lock, Static Teams This results in players being automatically assigned to teams and not allowed to change to other teams. teamplay 3 Health Protect, Armor Protect You can't hurt your teammates' health OR armor. teamplay 28 Mirror Damage, Frag Penalty, Death Penalty When you shoot your teammates, you take damage and so do they. If you kill a teammate, you'll take a frag penalty and you'll be killed. teamplay 120 Static Teams, Color Lock, Frag Penalty, Death Penalty In addition to the bitfield, you can also set teamplay to a negative number. When teamplay is negative, it indicates how many frags players should be penalized for killing their teammates. In this mode of operation, the only effect of the teamplay setting is that the number of frags indicated by teamplay is deducted from a player's frag count when he kills a teammate. This is equivalent to teamplay 8, except that the frag penalty is adjustable in-game. Besides the teamplay setting, there are some other options that can be modified by editing the source. These options are constants at the beginning of teamplay.qc and are marked so you can find them. One option specifies the default frag penalty. This is the number of frags that will be deducted by the bit-field Frag Penalty setting. There are four constants in teamplay.qc which allow configuration of the teamlock settings. TEAM_COLOR1 thru TEAM_COLOR4 have values indicating a legal team color, or -1. A value of -1 indicates that this team is not used. Thus, the number of teams is adjustable from 1 to 4. Example: float TEAM_COLOR1 = 4; float TEAM_COLOR2 = 13; float TEAM_COLOR3 = -1; float TEAM_COLOR4 = -1; This setting indicates that there should be two teams. Team 1's color is red and team 2's color is blue. Teams 3 & 4 are not used and thus have a value of -1. By default, the server will enforce that all players are wearing the "base" skin so that the players can be told apart by color. Alternately, teams can be told apart by the skin they are wearing. To set this up, go into teamplay.qc and edit the skin names in the function TeamSkinForTeam(). No understanding of the code is required. If you change any of the constant values, you must recompile before your changes will take effect. MOTD use: Most of the MOTD functionality resides in motd.qc. If you want to change your MOTD, you can modify motd.qc. It's a simple matter of changing the print statements to say what you want. The MOTD will be automatically be displayed when players spawn regardless of the teamplay setting. Known bugs/quirks: In order to change teams, players must attempt to change color. Attempting to change team name (by typing "team blah") will not have an effect, nor will attempting to change skin. The Color Lock and Static Teams settings sometimes behave unexpectedly when turned on in the middle of gameplay. I've spent quite a bit of time trying to make them do the correct things, but they still work much better if you set them before the game starts. Thus it is recommended that you set your teamplay value before you begin the team game. Future additions: (hopefully) Team Frag Counter Team Frag Counter triggers fraglimit Combination with The Fiend's Pentagram to allow teams of humans vs. Fiends and such Bug reports, comments, suggestions: If you find bugs in this software or have comments or suggestions, please send an email. THE COMPLETE ENHANCED TEAMPLAY Programming by John Spickes aka Guru jspickes@eng.umd.edu QuakeWorld Port and Partial Rewrite Charles Kendrick aka Myrkul myrkul@myrkul.org Thanks to the following netizens: * Dennis Noordsij (lnoordsi@inter.NL.net), who gave me the idea for TeamLock. * Vhold who wrote the original code to drop backpacks. * Griffin, who helped me figure out how to retain teams across levels. $Id: team.txt 1.11 1996/08/17 16:28:21 jspickes Exp $