If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Development:Team Fortress 2/April 21st, 2020 Codebase Leak/Game Modes

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Development:Team Fortress 2/April 21st, 2020 Codebase Leak.

Hmmm...
To do:
Add source code references for Raid Mode

Raid Mode

Raid Mode (also once mentioned in code as Squad Co-op mode) was supposed to be a PvE variation of CTF game mode, where human-controlled players would be attackers (or "invaders", as comments in game code suggest) in BLU team, and AI-controlled players - defenders in RED team. This mode had been developing from mid-2009 to early 2011 and in the end was abandoned in favor to Creep Mode and subsequently Mann vs Machine game modes.

In Raid Mode human-controlled team consisted of 5 players presumably would supposed to attack and capture control points protected by various groups of AI-controlled players. The presumable goal for players is to capture all points and don't let bots recapture them back. Bots spawn faster if RED raiders are currently capturing point. Maps, models and a few textures made for the Raid Mode were leaked as part of the 2023 Source Developer Asset Repository leaks.

Types of bot groups are:

Defenders; up to 18 bots. They can't spawn in regions under radar's control.

Wanderers; up to 10 bots are not ordered to do anything special and just scattered around the map. Demomen as wanderers can use only stickies (tf2\server\tf\bot\tf_bot.cpp, line 2942).
Wanderer behavior file shows that wanderers are supposed to use only melee (which is conflicting with the previous condition for Demoman);

When RED player is killing BLU bot near wanderer within aggro range (500 HU and less), it reacts instantly, if within (500; 1000) interval - time reaction is extended up to 1 second. Wanderers aren't supposed to react on kills farther than 1000 HU.
There's also "tf_raid_wanderer_reaction_factor" variable that seems to be multiplier (and therefore virtually unused due to value 1) of bot's reaction time when nearby teammate is killed.
Wanderers would suppose to periodically (random number from 20 to 30 seconds) produce (emit) sounds from "Jeers" sound bank for respective class. Interesting fact is that Scout is coded to emit unique sound, described as "Scout.WanderJabber".

Squads; the squad is spawned by one and always includes 4 members, each of them spawns as specific class: Heavyweapons, Soldier, Pyro and Demoman. When any of players from BLU team reaches half of "maximum incursion" distance, Medic replaces one random of aforementioned classes in the squad. The leader of the squad is always the slowest member, and the other, excluding Medic, are supposed to follow him on some distance. The code of squad's behavior is partially reused in Mann vs Machine mode.

Snipers: they are dinamically spawned and despawned, similar to Spies in Mann vs Machine(they teleport into their positions instead of simple spawning, but aside of that, it's still pretty close) and their spawn points follow positions of players (or to be more precise, "incursion progress"). Their spawn point must be invisible for players, but not farther than 6000 HU from the current "incursion progress" point.

Sentry Guns as standalone category, though they are just Engineer's buildings.

Mini-bosses

(tf2\server\tf\bot_npc\bot_npc_mini.cpp, tf2\server\tf\bot_npc\bot_npc_mini.h)

A little code file about "mini-bosses" presents in source code. This file dated March 2011 and made by Michael Booth. According to it, only two bosses present - "rockets" and "nuker". They would supposed to have both 5000 health and use "knight_mini" model.

Header file contains a little more informations about them. Both of them would have 150 HU\s speed and could be "stunned" from 300 damage. "rockets" one could shoot rockets (duh) with 0,5 second interval and deal 25 damage by them. "nuker"'s damage is inknows, only grenade interval assigned - 2 seconds.

MvM giants in release version of the game are internally called "mini-bosses", there might be connenction between these appearences.

(maybe it just boss_alpha attacks? I can't tell if it's true but it seems too similar to boss_alpha stickies and rockets attack)

BOSS_ALPHA

(to do: search already that Valve Repo leak and connect this article and models from that... or not; none of the models I could see from videos can really fit BOSS_ALPHA seuqences described here);

include more information from bot_npc.cpp file)

BOSS_ALPHA is the internal name of the entity that would be a boss in Raid Mode. Its appearance is currently unknown. All the files (boss_alpha.cpp, bot_npc.cpp, don't forget to include other files) which contain information about this boss are dated October or November 2010, with several excecptions from early 2011.


This boss is internally called BOSS_SENTRY in game files. "Mecha Level Sentry 4" is just a speculative name from external sources and can't be confirmed.

Its attributes can be seen in boss_alpha.cpp file.

  • Invulnerable all the time, unless stunned;
  • 30000 HP;
  • 30% damage received from miniguns, sentries and grenades;
  • 50% damage received from rockets;
  • 1000% damage received when stunned (combined with the fact that it can be damage only when stunned, the actual HP amount is 3000);
  • 300 HU\s speed (standart, probably still default);
  • 300 HU radius of bomb and stickies explotion.

Behavior sequences:

  • Shoots barrage of 5 rockets, interval 0.3 seconds, 25 damage, crockets when ENRAGED;
  • Makes taunt, then shoots sticky bombs in two ways - "rings" and "spokes", in both stickies expolde in 3 seconds after launch and deal 25 damage;
  • 1. Hurls an unknown amount of stickies around itself; spins around itself when shooting, makes two spins, the first one - 10 degrees aim angle elevation, the second - 30 degrees;
  • 2. Shoots 15 stickies in a particular direction, but with various launch speed, forming "stickies beam" (yes, that's how it named in the code);
  • Reacts on player's taunt and chooses him as its target, 10 seconds refresh;
  • Makes an "FireOutput" or "FireEvent" event every time when lost 10% health (nine events when reaching 90, 80, 70, 60, 50, 40, 30, 20, and 10 percents;
  • Releases "bot_minion"s;
  • Produces "nuke": revenge attack after end of stun duration, it deals direct damage and applies 5 seconds of afterburn on victims; direct damage is equal player's HP minus 60.

Another attack variation from bot.cpp file[1] is "railgun", though actually it's not a hitscan weapon, but rather very fast (4000 HU\s) projectile arrow without gravity influence, yet still launched with target movement aim adjustment measures. Its base damage is 200 and arrows are always critical, there 's also commented section with alternate damage calculation, which is based on current target's maximum health and always exceeds it on 5.

// set damage to 5 points more than our target's max health so a Medic can save us
// arrow->SetDamage( ( target->GetMaxHealth() + 5.0f ) / TF_DAMAGE_CRIT_MULTIPLIER );

skill_shot

The only way to make boss vulnerable. There are three types of skill shots. The team must perform three skill shots in a row to successfully stun boss, within 10 seconds interval, othervise the combo resets. The boss drops three medium ammo boxes after this event.

Skill shot types:

  • 1. Precision: hitting 3 spots within 6 seconds, every spot has its unique hit sound;
  • 2. Hard_hit: deal 40 damage to boss while being above its hitbox ~150 HU;
  • 3. Damage_sponge: deal 500 damage to boss: damage counter periodically (unknown time) decreases by 100.

bot_minion

(to do: again, search Valve Repo leak models and find the actual bot_minion model... or not, because, again, none of the models from various videos about this leak show anything similar described in code)

Entities that help boss_alpha fight the merenaries. Jugding by their code, they were supposed to be mechanical hovering insects.

Internal name: bug_zapper;

Attributes:

  • 60 HP;
  • 50% damage multiplier from turrets;
  • 200% damage multiplier from every Sniper's primary weapon except bow;
  • 300% damage multiplier from Sniper's bow;
  • 250 HU\s speed;
  • 500 HU\s acceleration;
  • 3 seconds lasting uber after bot launch;
  • Vulnerable to airblast, can be pushed;
  • Drops medium ammo box after death.

Attack attributes:

These bots were supposed to paralyze mercenaries (supposedly with electric charge) and eventually kill them. BOSS_ALPHA has the code which tell it to run to the paralyzed victim and attack him. When ubered players is attacked, an "energy feedback" event is occurred and bot would die with "evergy_beam" animation\effects, used when robots are killed with Projectile Shield.

  • 100HU attack range;
  • 1.5 seconds is needed for player to stay within attack radius to let the bot start its attack;
  • TF_COND_STUNNED is victim condition (like from old Sandman);
  • 1000 undefined damage is dealt after 7 seconds attack impact.

Creep Mode

Another MvM predecessor, this is abandoned game mode that is seems to be made under strong influence of DotA 2 (just like Raid Mode was made under influence of Left 4 Dead 2), in particular - the idea of "creep waves" - some creatures (maybe robots, though it's unclear) from RED and BLU sides that are rushing to control points in order to capture them, and the goal of players is defend friendly and destroy enemy creeps. Killing creeps would also gain experience, and players could be promoted to higher levels. It was developed during middle 2010 to February 2011 and seemignly abandoned (or evoluted) in favor of Mann vs Machine idea.

Bounty Mode

Bounty Mode seems to be an idea to unite experience system from Creep Mode, as well as upgrade system from Mann vs Machine, with some standart PvP mode, such as CTF of CP. Just as Creep Mode, it seems to be abandoned on early stages of development, so information about it is scarce. Players could kill enemies, both player- and server-controlled, in order to gain currency and spend it to upgrades (Upgrade Station UI would supposed to be opened when Supply Cabinet is touched), and receive experience points, though their intended usage is much more vague. When killed, players would lose some currency (unlike MvM), and the amount of lost currency is coded as some percentage from unspent credits[2], however, coefficient is set to zero[3], so this feature is technically unused. A single test map for Bounty Mode was leaked as part of the 2023 Source Developer Asset Repository leaks.


ConVar tf_bountymode_currency_penalty_ondeath( "tf_bountymode_currency_penalty_ondeath", "0", FCVAR_ARCHIVE, "The percentage of unspent money players lose when they die in Bounty Mode.\n" ); 

Sappers could be attached to another players, just like in MvM. Players could also refund both currency and experience.

Some code reveals that the game would supposed to reward players for various actions, such as capturing point or assisting players. [4]

Action Credit reward Notes
KILLED_PLAYER 40
KILLED_OBJECT 40 The difference between "player" and "object" terms might indicate about NPCs presence, like robots from MvM or Creep Mode.
ASSISTED_PLAYER 20
BONUS_POINTS 1
CAPTURED_OBJECTIVE 100
ESCORT_REWARD 10 Although "Escort" is usually accociated with cut "Escort" game mode (that one with Civilian), this is most probably about Payload game mode.
PACK_SMALL 5 Corresponds to the currency size of small pack in MvM and could be a leftover\taken concept.
PACK_MEDIUM 10 Corresponds to the currency size of medium pack in MvM and could be a leftover\taken concept.
PACK_LARGE 25 Corresponds to the currency size of large pack in MvM and could be a leftover\taken concept.
WAVE_COLLECTION_BONUS 100 This is really similar to MvM collection bonus, and even currency size matches (for A+ scenario). With the fact that "wave" term from MvM mentioned, it might be another indication about robot waves involvement in Bounty Mode.

Some bots would appear to be giants (with applied "mini-boss" attribute)[5]. There was supposed to be two types of bots - raiders and defenders.

Attribute\multiplier Raider Defender
Scale 1,75 1,75
Maximum health 5000 3300
Speed 0,5 0,5
Damage bonus 1,5 -
Reload rate - 0,6
Fire rate - 0 ,75
Damage force reduction 0,3 0,5
Airblast vulnerability 0,3 0,5

Another code chunk describes experience system [6]. Despite of named "crude" in comments, it actually provides adjustment system based on level difference between killer and killed players to reward killing high-level player by low-level ones and the opposite. The amount of experience needed to achieve the next level is 400, and the level number is capped on 20.

Level difference between killed and killer From -19 to -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Experience reward 0 8 10 13 or 14 20 40 80 120 160 200 240 280 320 360 400 440 480 520 560 600 640 680 720 760 800
  1. game/server/tf/bot_npc/bot_npc.cpp, line 2363
  2. game/server/tf/tf_player.cpp, line 11814
  3. game/shared/tf_gamerules.cpp, line 581
  4. game/shared/tf/tf_gamerules.cpp, line 14410
  5. game/tf2/server/tf/bot/behavior/tf_bot_tactical_monitor.cpp, line 486
  6. game/server/tf/tf_player.cpp, line 21138-21208