SteamVR/Environments/Scripting: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Updated links and references to match the other SteamVR Home pages)
m (clean up)
 
Line 1: Line 1:
The SteamVR Workshop Tools include the [[VScript]] scripting system with an extensive API, allowing many modifications and extensions to the game, including access of the VR motion controllers. Scripting is done using the Lua language.
The SteamVR Workshop Tools include the [[VScript]] scripting system with an extensive API, allowing many modifications and extensions to the game, including access of the VR motion controllers. Scripting is done using the Lua language.


Many of the [[Dota_2_Workshop_Tools/Scripting| Dota 2 scripting features]] also apply to the SteamVR Workshop Tools. Some of the links below may have inconsistencies when scripting for SteamVR instead of Dota 2.
Many of the [[Dota 2 Workshop Tools/Scripting|Dota 2 scripting features]] also apply to the SteamVR Workshop Tools. Some of the links below may have inconsistencies when scripting for SteamVR instead of Dota 2.


== Getting Started ==
== Getting Started ==
There are three main ways of running scripts in SteamVR Home. Game mode scripts are specific to the add-on, and are executed when a map in the add-on loads. Map scripts are executed when the specific map is loaded, and receive callbacks from the scripting system on certain events. Entity Scripts are set up on specific entities and execute when the entity is spawned.
There are three main ways of running scripts in SteamVR Home. Game mode scripts are specific to the add-on, and are executed when a map in the add-on loads. Map scripts are executed when the specific map is loaded, and receive callbacks from the scripting system on certain events. Entity Scripts are set up on specific entities and execute when the entity is spawned.
* [[SteamVR/Environments/Scripting/Map_Scripts|Map Scripts]]
* [[SteamVR/Environments/Scripting/Map Scripts|Map Scripts]]
* [[Entity_Scripts|Entity Scripts]]
* [[Entity Scripts]]


* [[Dota 2 Workshop Tools/Scripting/Debugging Lua scripts|Debugging Lua scripts]]
* [[Dota 2 Workshop Tools/Scripting/Debugging Lua scripts|Debugging Lua scripts]]
Line 14: Line 14:
* [[Dota 2 Workshop Tools/Scripting/Console Commands|Console Commands]]
* [[Dota 2 Workshop Tools/Scripting/Console Commands|Console Commands]]
* [[Dota 2 Workshop Tools/Scripting/Dedicated VConsole Log Viewer|Dedicated VConsole Log Viewer]]
* [[Dota 2 Workshop Tools/Scripting/Dedicated VConsole Log Viewer|Dedicated VConsole Log Viewer]]
* [[Dota_2_Workshop_Tools/Scripting/Listening_to_game_events|Listening to Game Events]]
* [[Dota 2 Workshop Tools/Scripting/Listening to game events|Listening to Game Events]]


== Reference ==
== References ==
* [[SteamVR/Environments/Scripting/API|Scripting API]]
* [[SteamVR/Environments/Scripting/API|Scripting API]]
* [[Source_2_Animation_System_VScript_API|Animation System API]]
* [[Source 2 Animation System VScript API|Animation System API]]


== '''<span style="color: red">New:</span>''' Examples ==
== '''<span style="color: red">New:</span>''' Examples ==
* [[SteamVR/Environments/Scripting/Lua Scripting Intro| Lua Scripting Intro]]
* [[SteamVR/Environments/Scripting/Lua Scripting Intro|Lua Scripting Intro]]
* [[SteamVR/Environments/Scripting/Linking Lua with Hammer| Linking Lua with Hammer]]
* [[SteamVR/Environments/Scripting/Linking Lua with Hammer|Linking Lua with Hammer]]
* [[SteamVR/Environments/Scripting/Linking Lua with Javascript| Linking Lua with Javascript]]
* [[SteamVR/Environments/Scripting/Linking Lua with Javascript|Linking Lua with Javascript]]
* [[SteamVR/Environments/Scripting/Flashlight_Tool_Tutorial|Creating a Flashlight Tool]]
* [[SteamVR/Environments/Scripting/Flashlight Tool Tutorial|Creating a Flashlight Tool]]
* [[SteamVR/Environments/Scripting/Custom_Tool_Creation|Custom Tool Creation]]
* [[SteamVR/Environments/Scripting/Custom Tool Creation|Custom Tool Creation]]


== '''<span style="color: red">New:</span>''' Lua Resources ==
== '''<span style="color: red">New:</span>''' Lua Resources ==

Latest revision as of 02:19, 6 January 2024

The SteamVR Workshop Tools include the VScript scripting system with an extensive API, allowing many modifications and extensions to the game, including access of the VR motion controllers. Scripting is done using the Lua language.

Many of the Dota 2 scripting features also apply to the SteamVR Workshop Tools. Some of the links below may have inconsistencies when scripting for SteamVR instead of Dota 2.

Getting Started

There are three main ways of running scripts in SteamVR Home. Game mode scripts are specific to the add-on, and are executed when a map in the add-on loads. Map scripts are executed when the specific map is loaded, and receive callbacks from the scripting system on certain events. Entity Scripts are set up on specific entities and execute when the entity is spawned.

Common Techniques

References

New: Examples

New: Lua Resources