[TF2] Mann vs. Mann
A custom Team Fortress 2 gamemode that mixes Mann vs. Machine mechanics with regular gameplay.
Have you ever wondered what it would be like to use your Mann vs. Machine upgrades to fight real players instead of robots? Do you hate respawning and wish you could just buy back into the game, or be revived by a friendly Medic? If you answered yes to any of these questions, this gamemode got your back.
Inspired by the scrapped
Bounty Mode, players may purchase upgrades at resupply lockers with money earned from fallen enemies.
🡺 Source Code on GitHub
Features
- Fully functioning Mann vs. Machine mechanics in regular gameplay
- Player and Item Upgrades
- Power Up Canteens
- Money Pickups
- Buybacks
- Revive Markers
- ...and much more
- Compatible with all official gamemodes (except Mann vs. Machine)
- Support for custom upgrade files
- Configurable using plugin ConVars
Download
You can find the latest release package on the
Releases tab of the GitHub repository.
You can also find the change log between versions there.
🡺 Download Latest Release
Requirements
Custom Upgrades
The gamemode fully supports custom upgrade files.
Usually, this would only be possible if the file is packed into the map, but due to a bug in the parsing code we are able to load our own file on both the server and the client. (fixed as of 2022-12-01)
Custom upgrade files are quite limited in functionality due to Valve hardcoding all applicable upgrades for each weapon. As a result, adding new weapon upgrades is
not possible. You can, however, add new player upgrades and edit/remove all default upgrades.
Step by Step Instructions- Create a copy of the default upgrades file found at scripts/items/mvm_upgrades.txt and copy it to scripts/items/ on your server
- Edit the file to suit your needs
- Give the file a unique name along with a version number (e.g. mvm_upgrades_mikusch_v1.txt)
- This is very important because clients have to download the upgrades file in order to see the upgrade menu
- Having a unique and versioned name ensures that you can update the file at a later point
- Set the value of the convar sm_mvm_custom_upgrades_file to the path of your new file (e.g. sm_mvm_custom_upgrades_file "scripts/items/mvm_upgrades_mikusch_v1.txt")
- ???
- Profit!
Events
Instead of creating dozens of forwards, this plugin fires Mann vs. Machine events which you can hook in your own plugins.
List of Mann vs. Machine Events
- revive_player_notify
- revive_player_stopped
- revive_player_complete
- player_buyback
- player_used_powerup_bottle
- player_directhit_stun
- player_currency_changed
- player_upgraded
- medigun_shield_blocked_damage
- mvm_sniper_headshot_currency
- mvm_quick_sentry_upgrade
- mvm_pickup_currency
- mvm_medic_powerup_shared
- upgrades_file_changed
ConVars
Console output from the
find command (because I'm lazy):
Code:
"sm_mvm_resupply_upgrades" = "1"
- When set to 1, the resupply locker will act as an upgrade station.
"sm_mvm_respec_enabled" = "1"
- When set to 1, players can refund their upgrades.
"sm_mvm_player_sapper" = "1"
- When set to 1, Spy can place sappers on players.
"sm_mvm_setup_quickbuild" = "1"
- When set to 1, Engineer can quickbuild during setup.
"sm_mvm_backstab_armor_piercing" = "1"
- When set to 1, backstabs use armor piercing upgrades to determine the damage.
"sm_mvm_arena_canteens" = "1"
- When set to 1, Power Up Canteens may be used in arena mode.
"sm_mvm_defender_team" = "any"
- Determines which team is allowed to use Mann vs. Machine Defender mechanics. {any, blue, red, spectator}
"sm_mvm_death_responses" = "0"
- When set to 1, players will announce their teammate's deaths.
"sm_mvm_custom_upgrades_file" = ""
- Custom upgrade menu file to use, set to an empty string to use the default.
"sm_mvm_broadcast_events" = "0"
- When set to 1, the 'player_buyback' and 'player_used_powerup_bottle' events will be broadcast to all players.
"sm_mvm_revive_markers" = "1"
- When set to 1, players will create revive markers on death.
"sm_mvm_radius_spy_scan" = "1"
- When set to 1, Spy will reveal cloaked enemy Spies in a radius.
"sm_mvm_medigun_shield_damage_modifier" = "0"
- Multiplier to damage of the shield created by the Medi Gun's 'Projectile Shield' upgrade.
"sm_mvm_explosive_sniper_shot_damage_modifier" = "1.0"
- Multiplier to damage of the explosion created by the 'Explosive Headshot' upgrade.
"sm_mvm_gas_explode_damage_modifier" = "0.5"
- Multiplier to damage of the explosion created by the 'Explode On Ignite' upgrade.
"sm_mvm_players_are_minibosses" = "1"
- When set to 1, all upgrades will function as if players are MvM giants.
"sm_mvm_music_enabled" = "1"
- When set to 1, Mann vs. Machine music will play at the start and end of a round.
"sm_mvm_spawn_protection" = "1"
- When set to 1, players are granted ubercharge while they leave their spawn.
"sm_mvm_showhealth" = "0"
- When set to 1, shows a floating health icon over enemy players.
"sm_mvm_upgrades_reset_mode" = "0"
- How player upgrades and credits are reset after a full round has been played. 0 = Reset if teams are being switched or scrambled. 1 = Always reset. 2 = Never reset.
"sm_mvm_currency_rewards_player_modifier_medieval" = "0.33"
- Multiplier to dropped currency in medieval mode.
"sm_mvm_currency_rewards_player_modifier_arena" = "2.0"
- Multiplier to dropped currency in arena mode.
"sm_mvm_currency_rewards_player_catchup_max" = "1.5" min. 1.000000
- Maximum currency bonus multiplier for losing teams.
"sm_mvm_currency_rewards_player_catchup_min" = "0.66" min. 0.000000 max. 1.000000
- Maximum currency penalty multiplier for winning teams
"sm_mvm_currency_rewards_player_count_bonus" = "2.0" min. 1.000000
- Multiplier to dropped currency that gradually increases up to this value until all player slots have been filled.
"sm_mvm_currency_rewards_player_killed" = "15"
- The fixed number of credits dropped by players on death.
"sm_mvm_currency_starting" = "1000" min. 0.000000
- Number of credits that players get at the start of a match.
"sm_mvm_enabled" = "1"
- When set, the plugin will be enabled.
"sm_mvm_version" = "1.15.0"
notify singleplayer replicated
- Mann vs. Mann plugin version
__________________