MvMTrainer Plugin v1.0.1 for Team Forterss 2
==========================================
Copyright © 2013, Yuri Sakhno (George1). All rights reserved.
Copyright © 2013, Componentix http://www.componentix.com/
MvMTrainer is a plugin for Valve's game Team Fortress 2. When properly installed, it allows you to play
the Mann-vs-Machine games in 'trainer' mode, which requires the least care about money and Engineer's sentryguns
as well as some other features. The plugin was conceived as a single means of 'set it and forget it' play,
when the player would be able to build a sentrygun (preferably — several of them) and leave the game unattended
for long periods of time, so that robots would be endlessly killed, and kills counted towards the goal of getting
Silicon Slaughter and Metal Massacre actievements. This type of play requires specially modified population script
file(s) (to provide the endless waves of robots), but even without modifying the population files you may extract
some fun and joy out of the new possibilities the plugin provides, such as easily surving the toughest missions
the game has.
Current plugin version is 1.0.1;
Team Fortress 2 version which is guaranteed to be supported: 1.2.5.0 (5191) built on Jan 23 2013
Contents
--------
1. Licensing
2. Warranties
3. Installation/Unistallation
4. Features
5. Configuration
6. ChangeLog
7. Acknowledgements
1. Licensing
---------
The MvMTrainer plugin is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
You should have received a copy of the GNU General Public License along with this plugin.
If not, see <http://www.gnu.org/licenses/>.
2. Warranties
----------
The MvMTrainer plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
3. Installation/Unistallation
--------------------------
Please refer to accompanying file installation.txt for detailed instructions of installing/uninstalling the plugin.
4. Features
--------
The MvMTrainer plugin provides the following features*:
* automatic Engineer's buildings healing and restocking
* ability to build multiple sentryguns if you play as Engineer
* ability to put sentryguns wherever you want**
* automatic buying almost all of the upgrades (with no actual money spent)
* coloring Engineer's buildings into one of the randomly-chosen colors at construction (i.e. when 'placed')
* allowing the bomb to be reset after being dropped (does not override resetting feature if one is already
supported by the map)
* shorter respawn times
*Note that all of these features only work in MvM-play and are disabled during all other gameplay types.
**Be advised though that if you place your sentrygun inside a map's prop (such as a pile of wooden planks
or a crate), it won't take any damage from incoming fire from robots (in fact, robots will ignore it altogether),
but it will also do nothing (won't fire at robots). Additionally, you most likely won't be able to retrieve it from
there.
5. Configuration
-------------
You may start using the plugin with minimal to no configuration; all of the plugin's settings have reasonable
defaults. If, however, you need to tune the plugin to your needs, you can do so through the console variables
that the plugin defines. This section describes all of those in detail.
The list of console variables (ConVars) defined by the plugin:
mt_version
Value type: string
Contains the current version of the MvMTrainer plugin. You may change this variable, but it will not change
the behavior of the plugin in any way.
mt_bomb_reset_time
Value type: real number
Minimum value: -1.0
Defines time, in seconds, before the bomb will be reset back to start if dropped. If this variable is set to
zero, then the bomb will be reset back to start immediately after it is dropped onto the ground (if another
robot picks up the bomb immediately as the carrier is killed, that does not count as a drop).
You may set this variable to -1 to disable bomb resetting altogether. Unfortunately, this will only work if the
bomb hasn't been dropped in the current mission when this variable had some other value. Otherwise, the bomb
reset timer will retain the value used last time. In other words, there is no means of resetting the bomb reset
timer other than restarting the mission.
Setting this variable when the bomb is already lying on the ground will not reset the bomb timer. The bomb will
have to be picked up and then dropped again in order for the new reset duration to be applied.
If the map provides its own capabilities of resetting the bomb (such as Coaltown Event one, and Ironman mission
of the Mannworks map), then map-set duration for the timer will override the value set by this variable.
mt_respawn_delay
Value type: real number
Minimum value: 0.1
Specifies the delay, in seconds, before the player will be respawned when killed. Applies only to players
on team RED. The player will be respawned even if map dictates longer respawn time, or the player died during
the mission win/loss period.
If you want to disable this feature, set it to some very long duration (like 100 seconds), by which time
the player most likely will have been respawned by some other means.
Note: Although the minimum value supported by the plugin for respawn delay is 0.1 seconds, you shouldn't really
set it below 1.5 or so. This is because some players may have The Bombinomicon item on them, which causes them
to gib, or 'Explode spectacularly on death'. If they respawn before their late corpse had chance to explode,
they will actually explode in the spawn room. This will not kill them again; just won't be so spectacular.
mt_healing_delay
Value type: real number
Minimum value: 0.05
The delay, in seconds, between health restoration of Engineer's buildings and restocking of sentryguns with ammo
and rockets.
You should refrain from setting this value too low, as it will increase load on the CPU of your server and might
potentially increase your Internet traffic. If you really need sentryguns to heal great amounts, you should
better set mt_heal_sentries_by variable to some higher value.
mt_heal_sentries_by
Value type: integer, whole number
Minimum value: 0
The amount of health added to every sentrygun of team RED each healing session (see mt_healing_delay variable).
If you set this variable to zero, sentryguns won't be healed at all (but they still may be restocked with ammo
and rockets, this is controlled by other variables).
Healing affects all types of sentryguns — normal, mini-sentries, or disposable ones.
Sentryguns cannot be and won't be 'overhealed'.
mt_heal_dispensers_by
Value type: integer, whole number
Minimum value: 0
The amount of health added to every dispenser of team RED each healing session (see mt_healing_delay variable).
If you set this variable to zero, dispensers won't be healed at all.
Dispensers cannot be and won't be 'overhealed'.
mt_heal_teleporters_by
Value type: integer, whole number
Minimum value: 0
The amount of health added to every teleporter of team RED each healing session (see mt_healing_delay variable).
If you set this variable to zero, teleporters won't be healed at all.
Healing affects teleporters in both modes — be it Entry or Exit.
Teleporters cannot be and won't be 'overhealed'.
mt_add_sentry_ammo
Value type: integer, whole number
Minimum value: 0
The amount of ammo shells to add to every sentrygun of team RED each healing session (see mt_healing_delay
variable). If you set this variable to zero, sentryguns won't be restocked with ammo shells automatically (but
they still may be healed or restocked with rockets, see variables mt_heal_sentries_by and mt_add_sentry_rockets
respectively).
As with healing (see variable mt_heal_sentries_by), restocking with ammo affects all types of sentryguns —
normal, mini-sentries, or disposable ones.
Sentryguns cannot contain more than the pre-defined amount of shells for the respective sentrygun level.
Sentryguns of level 1 may contain a maximum of 150 shells, while sentryguns of levels 2 and 3 may have no more
than 200 shells.
mt_add_sentry_rockets
Value type: integer, whole number
Minimum value: 0
The amount of rockets to add to every sentrygun of team RED each healing session (see mt_healing_delay
variable). If you set this variable to zero, sentryguns won't be restocked with rockets automatically (but
they still may be healed or restocked with ammo shells, see variables mt_heal_sentries_by and mt_add_sentry_ammo
respectively).
Restocking with rockets affects only normal sentryguns and of those, only sentryguns of level 3 is affected.
Sentryguns cannot contain more than the pre-defined amount of rockets, which is 20.
mt_auto_upgrade
Value type: boolean (0 - false, 1 - true)
Determines whether players and their weapons should be auto-upgraded upon spawning. This variable is a master
variable that determines whether auto-upgrading wii be done at all, but it is not enough to set only this
variable to 1. Variables that control particular upgrading must also be set to 1 to determine which types of
upgrades should be applied (see mt_auto_upgrade_resistances and mt_auto_upgrade_weapons for more information).
Upgrades will only be applied to players on team RED. Applying upgrades automatically does not consume money,
although players will be able to sell their newly-acquired upgrades for money (thus possibly generating more
money than they would normally have even if they collected all of the money piles in a mission).
mt_auto_upgrade_resistances
Value type: boolean (0 - false, 1 - true)
Determines whether players' resistances should be automatically upgraded upon spawn. If this variable is set
to 1, and variable mt_auto_upgrade is also set to 1, then the following types of resistances will be upgraded
to their respective maximum values: Blast Resistance, Bullet Resistance, Movement Speed*, Health Regen,
Fire Resistance, Crit Resistance, Jump Height and, if the player is an Engineer, Metal Regen.
Upgrades will only be applied to resistances of players on team RED.
Variable mt_auto_upgrade must also be set to 1 in order for players' resistances to be upgraded.
*Note that in order for Movement Speed upgrade to take full effect, the player needs either to buy some upgrades
via the normal interface (and click the Accept button), or die. If the player changes class, they will need
to repeat either of these actions again for that new class.
mt_auto_upgrade_weapons
Value type: boolean (0 - false, 1 - true)
Determines whether players' weapons should be automatically upgraded upon spawn. If this variable is set
to 1, and variable mt_auto_upgrade is also set to 1, then most of weapon upgrades will automatically be applied
to players' weapons*.
Changing loadout inside of the respawn room causes spawn and automatic application of upgrades to those
recently chosen weapons.
Engineer's PDA 'build' tool will also be upgraded, as expected. As a bonus, Engineer's PDA 'build' tool will
have an upgrade unavailable by normal means — Increase Sentry Range, which will increase firing range
of sentryguns up to 4 times (although when placing sentryguns this range increase won't be displayed through
'reachability' sphere, in game sentryguns will be able to see enemies much further away).
Upgrades will only be applied to weapons of players on team RED.
Variable mt_auto_upgrade must also be set to 1 in order for players' resistances to be upgraded.
*Note that some weapons (particularly shield-type ones) are classified as wearables in game, not weapons.
Upgrades to those items will not be applied automatically.
mt_max_sentries_per_player
Value type: integer, whole number
Minimum value: 1
Maximum value: 50
Specifies the maximum amount of sentryguns every player on team RED can have active at the same time. The count
only includes normal sentryguns (not mini-sentries and not disposable ones). When a player has built this many
sentryguns, the next sentrygun they place will be a disposable sentrygun. If player has a disposable sentrygun
active somewhere in a map, they won't be able to build new sentryguns (of any kind), even if some of their
'larger' sentryguns may be destroyed. The player will need to destroy their disposable sentrygun in order
to be able to build new normal sentryguns again.
If you, as a server administrator, change this variable to a value which is less than the number of currently
active sentryguns for some player, the excess sentryguns will not be destroyed.
Although this variable sets a limit on the number of sentryguns for a player and you can specify that limit
to be very high, the player who have more than 6 active normal sentryguns will receive a nagging warning
approximately every 30 seconds asking them to destroy their excess sentryguns.
6. ChangeLog
---------
Please refer to accompanying file changelog.txt for the list of changes to the plugin.
7. Acknowledgements
----------------
Thanks goes to Valve for developing the Source engine and such greate games as Half-Life, Half-Life 2 and
Team Fortress 2, and for actively maintaining the latter one for so long.
The plugin relies on a code taken from the SourceMod project (file sm_symtable.h). Although that is only needed for
supporting the functionality of the plugin on Linux platform, where it has not been tested yet (if you can lend your
hand with compiling it for Linux and verifying the functionality on that platform, there is a place for you in this
section).
The plugin has ideas and solutions from the following SourceMod extensions (listed alphabetically by the name
of the extension):
Advertisements by DJ Tsunami - printing colored text directly to players' chats
Bonustime Autorespawn by Milo| - forced respawns of the players
Building HP Regain by ReFlexPoison - healing engineer's buildings
Building Repair by snekret - restocking sentryguns with ammo shells and rockets
Coloring Engineer Buildings by Oshizu - well, what the name says
TF2 Items Extension by Asher “asherkin” Baker - attribute lists for weapons (used for upgrades)