VScript
![]() | This topic is covered better by other wikis or sites. Please see the following links instead:
|
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
- Implemented VScript
- VScript allows mappers to embed script code (Squirrel3) into maps. This system is already being used for L4D2 and CS:GO maps.
- Interface with entities and the world like regular Hammer logic
- Simplify things that were previously incredibly complicated/tedious in Hammer logic
- Interact with and control bots, bosses, player attributes, entities, and game state closely, allowing for enhanced, modified or entirely custom game modes
- React to game events and change the outcome of certain things, such as damage calculations
- More technical info about VScript for Team Fortress 2 is available on the Valve Developer Community
- VScript allows mappers to embed script code (Squirrel3) into maps. This system is already being used for L4D2 and CS:GO maps.
- 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.
- 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 ofmaxplayers
- Fixed clearing script hooks on level transition
- Fixed
- 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
, andtf_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
- Added
October 10, 2024 Patch (Scream Fortress XVI)
- Exposed
CTFBaseBoss::SetResolvePlayerCollisions()
for VScript users
- Added VScript support for
HIDEHUD_MATCH_STATUS
flag to hide the Match Status panel.
See also
|