VScript

From Team Fortress Wiki
Jump to: navigation, search

VScript is a virtual machine for scripting used in some Source Engine games, including Team Fortress 2, that allows community creators to write and embed custom scripts into maps which then interact with the game and its entities. VScript was implemented into Team Fortress 2 in the December 1, 2022 Patch and has been used in several maps and game modes since.

Update history

December 1, 2022 Patch

December 7, 2022 Patch

  • Updated VScript
    • Updated HLTV placeholder player to not be a valid script entity. This fixes some scripts failing on dedicated servers because the HLTV placeholder player isn't accounted for.

January 5, 2023 Patch

  • Expanded VScript support
    • Fixed .nut files being valid files for download/upload
    • Fixed clients being able to run certain script_* debug commands on the server
    • Added EmitSoundEx
    • Fixed crashes related to null strings being passed to functions
    • Exposed a MaxClients function to get the current value of maxplayers
    • Fixed clearing script hooks on level transition

October 27, 2023 Patch

  • Added an extra HIDEHUD flag for vscript(sic) maps (HIDEHUD_TARGET_ID)

July 18, 2024 Patch (Summer 2024 Update)

  • Expanded VScript support
    • Added mp_tournament_redteamname, mp_tournament_blueteamname, and tf_mvm_max_connected_players to the list of whitelisted ConVars
    • Fixed vscript_convar_allowlist.cfg being overriden by being packed into a map
    • BaseEntity: AcceptInput, IsAlive
    • EconEntity: GetAttribute
    • TFPlayer: GetCustomAttribute, StunPlayer
    • TFBot: GetAllBotTags, SetMission, SetPrevMission, GetMission, GetPrevMission, HasMission, IsOnAnyMission, SetMissionTarget, GetMissionTarget, SetBehaviorFlag, ClearBehaviorFlag, IsBehaviorFlagSet, SetActionPoint, GetActionPoint

October 10, 2024 Patch (Scream Fortress XVI)

  • Exposed CTFBaseBoss::SetResolvePlayerCollisions() for VScript users

February 18, 2025 Patch

  • Added VScript support for HIDEHUD_MATCH_STATUS flag to hide the Match Status panel.

See also