Difference between revisions of "VScript"

From Valve Developer Community
Jump to: navigation, search
m (Implementations)
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
 
 
{{otherlang2
 
{{otherlang2
 
|zh-cn=VScript:zh-cn
 
|zh-cn=VScript:zh-cn
 
|ru=VScript:ru
 
|ru=VScript:ru
 
}}
 
}}
'''VScript''' is a virtual machine for scripting that acts as an abstract binding layer between the Source engine and external scripts. According to the [[Alien Swarm SDK]], the following scripting languages are, or could be supported in the near future:
+
'''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:
  
 
* [[Squirrel]]
 
* [[Squirrel]]
Line 12: Line 10:
 
* [http://en.wikipedia.org/wiki/Python_%28programming_language%29 Python]
 
* [http://en.wikipedia.org/wiki/Python_%28programming_language%29 Python]
  
Script files are placed and executed in <code>scripts/vscripts/</code> inside the game folder.
+
Script files are read from <code>/scripts/vscripts/</code> inside the game directory.
  
 
==Implementations==
 
==Implementations==
Line 23: Line 21:
 
:[[List of L4D2 Script Functions|List of Script Functions]]
 
:[[List of L4D2 Script Functions|List of Script Functions]]
  
;{{game link|Nuclear Dawn}}
 
:[[List of ND Script Functions|List of Script Functions]]
 
 
;{{game link|Alien Swarm}}
 
;{{game link|Alien Swarm}}
  
 
;{{game link|Portal 2}}
 
;{{game link|Portal 2}}
 
:[[List of Portal 2 Script Functions|List of Script Functions]]
 
:[[List of Portal 2 Script Functions|List of Script Functions]]
 +
 +
;{{game link|Source Filmmaker}}
 +
:{{tf2}} Only exists on the SFM build of TF2. No TF2 or SFM specific API. Unused.
  
 
;{{game link|Counter-Strike: Global Offensive}}
 
;{{game link|Counter-Strike: Global Offensive}}
 
:[[List_of_Counter-Strike:_Global_Offensive_Script_Functions|List of Script Functions]]
 
:[[List_of_Counter-Strike:_Global_Offensive_Script_Functions|List of Script Functions]]
 +
:[[Listening to game events in CS:GO|Listening to game events]]
 
:[[CSGO_Vscript_Examples|Script Examples]]
 
:[[CSGO_Vscript_Examples|Script Examples]]
  
 
;{{game link|Contagion}}
 
;{{game link|Contagion}}
 
:[[List of Contagion Script Functions|List of Script Functions]]
 
:[[List of Contagion Script Functions|List of Script Functions]]
 +
 +
;{{game link|Nuclear Dawn}}
 +
:[[List of ND Script Functions|List of Script Functions]]
 +
 +
;{{game link|Titanfall}}
  
 
;{{game link|Alien Swarm: Reactive Drop}}
 
;{{game link|Alien Swarm: Reactive Drop}}
 
:[[List of Reactive Drop Script Functions|List of Script Functions]]
 
:[[List of Reactive Drop Script Functions|List of Script Functions]]
  
;{{game link|Titanfall}}
+
;{{game link|Mapbase}} (Custom implementation)
 +
:[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]
  
 
===Lua===
 
===Lua===
Line 49: Line 56:
 
:[[Dota_2_Workshop_Tools/Scripting/API|Scripting API]]
 
:[[Dota_2_Workshop_Tools/Scripting/API|Scripting API]]
  
;[[Destinations]]
+
;{{game link|SteamVR Home}}
:[[Destinations/Scripting|Scripting]]
+
:[[SteamVR/Environments/Scripting|Scripting]]
:[[Destinations/Scripting/API|Scripting API]]
+
:[[SteamVR/Environments/Scripting/API|Scripting API]]
 +
:[[SteamVR/Environments/Scripting/Custom Tool Creation|Scripted Tool Creation]]
 +
:[[SteamVR/Environments/Scripting/Flashlight Tool Tutorial|Scripted Flashlight Tool Tutorial]]
  
;General Source 2
+
;{{game link|Half-Life: Alyx}}
 +
:[[Half-Life:_Alyx_Workshop_Tools/Lua_Scripting|Scripting]]
 +
:[[Half-Life_Alyx_Scripting_API|Scripting API]]
 +
 
 +
;General [[Source 2]]
 
:[[Source 2 Animation System VScript API]]
 
:[[Source 2 Animation System VScript API]]
  
Line 61: Line 74:
  
 
==Scripting Fundamentals==
 
==Scripting Fundamentals==
''Main article [[Vscript_Fundamentals| Vscript Fundamentals]]''
+
''Main article [[Vscript_Fundamentals|Vscript Fundamentals]]''
 
 
  
 
==See also==
 
==See also==

Latest revision as of 02:26, 9 July 2020

Русский 简体中文

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 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.

Implementations

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
Script Examples
<Contagion> Contagion
List of Script Functions
<Nuclear Dawn> Nuclear Dawn
List of Script Functions
<Titanfall> Titanfall
<Alien Swarm: Reactive Drop> Alien Swarm: Reactive Drop
List of Script Functions
<Mapbase> Mapbase (Custom implementation)
Scripting
GitHub

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 Animation System VScript API

Python

Source Filmmaker Source Filmmaker
Scripting/Rigging

Scripting Fundamentals

Main article Vscript Fundamentals

See also