VScript: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Converted {{otherlang2}} to {{lang}}.)
(Page is now much shorter. Put lists of games and their links next to each other. Used game specific colorful icon/link templates as guide. Removed unnecessary TOC.)
Line 1: Line 1:
{{lang|VScript}}
{{lang|VScript}}
'''VScript''', introduced in {{Game link|Left 4 Dead 2}}, is a virtual machine for scripting that acts as an abstract binding layer between the Source engine and external scripts. According to the {{Game link|Alien Swarm SDK}}, the following scripting languages are, or could be supported in the near future:
__NOTOC__
'''VScript''', introduced in {{l4d2|4}}, is a virtual machine for scripting that acts as an abstract binding layer between the {{source|4}} engine and external scripts. According to the {{Game link|Alien Swarm SDK}}, the following scripting languages are, or could be supported in the near future:


* [[Squirrel]]
* [[Squirrel]]
Line 8: Line 9:


Script files are read from <code>/scripts/vscripts/</code> inside the game directory.
Script files are read from <code>/scripts/vscripts/</code> inside the game directory.
To learn how VScripts are used, see [[VScript Fundamentals]].


==Implementations==
==Implementations==
 
{|
===[[Squirrel]]===
|- style=vertical-align:top
;{{game link|Left 4 Dead 2}}
|style=padding-right:2em|
===[[Squirrel]] {{sq}}===
{{l4d2|4}}
:[[L4D2 Vscripts|Scripting]]
:[[L4D2 Vscripts|Scripting]]
:[[L4D2_Director_Scripts|Director Scripts]]
:[[L4D2_Director_Scripts|Director Scripts]]
Line 18: Line 23:
:[[List of L4D2 Script Functions|List of Script Functions]]
:[[List of L4D2 Script Functions|List of Script Functions]]


;{{game link|Alien Swarm}}
{{as|4}}


;{{game link|Portal 2}}
{{portal2|4}}
:[[List of Portal 2 Script Functions|List of Script Functions]]
:[[List of Portal 2 Script Functions|List of Script Functions]]


;{{game link|Source Filmmaker}}
{{sfm|4}}
:{{tf2}} Only exists on the SFM build of TF2. No TF2 or SFM specific API. Unused.
:{{tf2}} Only exists on the SFM build of TF2. No TF2 or SFM specific API. Unused.


;{{game link|Counter-Strike: Global Offensive}}
{{csgo|4}}
:[[List_of_Counter-Strike:_Global_Offensive_Script_Functions|List of Script Functions]]
:[[List of CS:GO Script Functions|List of Script Functions]]
:[[Listening to game events in CS:GO|Listening to game events]]
:[[Listening to game events in CS:GO|Listening to game events]]
:[[CSGO_Vscript_Examples|Script Examples]]
:[[CS:GO VScript Examples|VScript Examples]]


;{{game link|Contagion}}
{{con|4}}
:[[List of Contagion Script Functions|List of Script Functions]]
:[[List of Contagion Script Functions|List of Script Functions]]


;{{game link|Nuclear Dawn}}
{{nd|4}}
:[[List of ND Script Functions|List of Script Functions]]
:[[List of ND Script Functions|List of Script Functions]]


;{{game link|Titanfall}}
{{tf|4}}


;{{game link|Alien Swarm: Reactive Drop}}
{{asrd|4}}
:[[List of Reactive Drop Script Functions|List of Script Functions]]
:[[List of Reactive Drop Script Functions|List of Script Functions]]


;{{game link|Mapbase}} (Custom implementation)
{{mapbase|4}} (Custom implementation)
:[https://github.com/mapbase-source/source-sdk-2013/wiki/VScript-in-Mapbase Scripting]
:[https://github.com/mapbase-source/source-sdk-2013/wiki/VScript-in-Mapbase Scripting]
:[https://github.com/mapbase-source/source-sdk-2013/tree/master/sp/src/vscript GitHub]
:[https://github.com/mapbase-source/source-sdk-2013/tree/master/sp/src/vscript GitHub]
|style=padding-right:2em|
===Lua {{lua}}===
{{portal2|4}} (Client/UI only)


===Lua===
{{dota2|4}}
;{{game link|Portal 2}} (Client/UI only)
 
;{{game link|Dota 2}}
:[[Dota_2_Workshop_Tools/Scripting|Scripting]]
:[[Dota_2_Workshop_Tools/Scripting|Scripting]]
:[[Dota_2_Workshop_Tools/Scripting/API|Scripting API]]
:[[Dota_2_Workshop_Tools/Scripting/API|Scripting API]]


;{{game link|SteamVR Home}}
{{svrh|4}}
:[[SteamVR/Environments/Scripting|Scripting]]
:[[SteamVR/Environments/Scripting|Scripting]]
:[[SteamVR/Environments/Scripting/API|Scripting API]]
:[[SteamVR/Environments/Scripting/API|Scripting API]]
Line 59: Line 64:
:[[SteamVR/Environments/Scripting/Flashlight Tool Tutorial|Scripted Flashlight Tool Tutorial]]
:[[SteamVR/Environments/Scripting/Flashlight Tool Tutorial|Scripted Flashlight Tool Tutorial]]


;{{game link|Half-Life: Alyx}}
{{hla|4}}
:[[Half-Life:_Alyx_Workshop_Tools/Lua_Scripting|Scripting]]
:[[Half-Life:_Alyx_Workshop_Tools/Lua_Scripting|Scripting]]
:[[Half-Life_Alyx_Scripting_API|Scripting API]]
:[[Half-Life_Alyx_Scripting_API|Scripting API]]


;General [[Source 2]]
;General {{source2|4}}
:[[Source 2 Animation System VScript API]]
:[[Source 2 Animation System VScript API]]
 
|
===Python===
===Python===
;{{game link|Source Filmmaker}}
;{{sfm|4}}
:[[SFM/Scripting_with_Python|Scripting/Rigging]]
:[[SFM/Scripting_with_Python|Scripting/Rigging]]
 
|}
==Scripting Fundamentals==
''Main article [[Vscript_Fundamentals|Vscript Fundamentals]]''


==See also==
==See also==
*[[Entity_Scripts|Entity Scripts]]
*[[Entity Scripts]]
*[[Logic_script|logic_script]]
*[[logic_script]]


[[Category:Technical]]
[[Category:Technical]]
[[Category:Scripting]]
[[Category:Scripting]]

Revision as of 15:38, 4 May 2022

English (en)Español (es)Русский (ru)中文 (zh)Translate (Translate)

VScript, introduced in Left 4 Dead 2 Left 4 Dead 2, is a virtual machine for scripting that acts as an abstract binding layer between the Source Source engine and external scripts. According to the Alien Swarm Alien Swarm SDK , the following scripting languages are, or could be supported in the near future:

Script files are read from /scripts/vscripts/ inside the game directory.

To learn how VScripts are used, see VScript Fundamentals.

Implementations

Squirrel Squirrel

Left 4 Dead 2 Left 4 Dead 2

Scripting
Director Scripts
Script Examples
List of Script Functions

Alien Swarm Alien Swarm

Portal 2 Portal 2

List of Script Functions

Source Filmmaker Source Filmmaker

Team Fortress 2 Only exists on the SFM build of TF2. No TF2 or SFM specific API. Unused.

Counter-Strike: Global Offensive Counter-Strike: Global Offensive

List of Script Functions
Listening to game events
VScript Examples

Contagion Contagion

List of Script Functions

Nuclear Dawn Nuclear Dawn

List of Script Functions

Template:Tf

Alien Swarm: Reactive Drop Alien Swarm: Reactive Drop

List of Script Functions

Mapbase Mapbase (Custom implementation)

Scripting
GitHub

Lua Lua

Portal 2 Portal 2 (Client/UI only)

Dota 2 Dota 2

Scripting
Scripting API

SteamVR Home SteamVR Home

Scripting
Scripting API
Scripted Tool Creation
Scripted Flashlight Tool Tutorial

Half-Life: Alyx Half-Life: Alyx

Scripting
Scripting API
General Source 2 Source 2
Source 2 Animation System VScript API

Python

Source Filmmaker Source Filmmaker
Scripting/Rigging

See also