This article relates to the game "Dota 2". Click here for more information.
This article relates to the SDK/Workshop Tools for "Dota 2 Workshop Tools". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Dota 2 Workshop Tools/Scripting: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{otherlang2
{{Dota 2Tools topicons}}
|zh-cn = Dota_2_Workshop_Tools:zh-cn/Scripting:zh-cn
{{Lang|title = Scripting}}
|ru= Dota 2 Workshop Tools:ru/Scripting:ru
[[Category:Dota 2 Workshop Tools]] [[Category:Scripting]]
}}
 
Scripting in Dota 2 is handled by the [[VScript]] virtual machine using the [http://www.lua.org Lua] programming language. Lua will be launched at run time when Dota 2 loads your add-on and can manipulate most facets of the game. Scripts can control the events that happen in game modes, game rules, abilities, hero interactions, neutrals , AI, and many more.
Scripting in Dota 2 is handled by the [[VScript]] virtual machine using the [http://www.lua.org Lua] programming language. Lua will be launched at run time when Dota 2 loads your add-on and can manipulate most facets of the game. Scripts can control the events that happen in game modes, game rules, abilities, hero interactions, neutrals , AI, and many more.
== Getting Started ==
== Getting Started ==
Line 16: Line 16:


== Common Techniques ==
== Common Techniques ==
* [[Entity_Scripts|Entity Scripts]]
* [[Dota 2 Workshop Tools/Scripting/ThinkerFunctions|Thinker Functions]]
* [[Dota 2 Workshop Tools/Scripting/ThinkerFunctions|Thinker Functions]]
* [[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]]
* [[Dota_2_Workshop_Tools/Script_Filters|Script Filters]]
* [[Dota_2_Workshop_Tools/Custom_Game_Events|Custom Game Events]]
* [[Dota_2_Workshop_Tools/Custom_Nettables|Custom Nettables]]


== Reference ==
== Reference ==
* [[Dota 2 Workshop Tools/Scripting/API|Scripting API]]
* [[Dota 2 Workshop Tools/Scripting/API|Scripting API]]
* [[Source_2_Animation_System_VScript_API|Animation System API (deprecated)]]
* [[Dota 2 Workshop Tools/Scripting/Built-In Engine Events|Built-In Engine Events (warning: many broken)]]
* [[Dota 2 Workshop Tools/Scripting/Built-In Engine Events|Built-In Engine Events (warning: many broken)]]
* [[Dota 2 Workshop Tools/Scripting/Built-In Ability Names|Built-In Ability Names]]
* [[Dota 2 Workshop Tools/Scripting/Built-In Ability Names|Built-In Ability Names]]
Line 46: Line 51:
* [https://github.com/bhargavrpatel/Dota-2-Sublime-Packages Sublime Text 2/3 Snippets for all functions]
* [https://github.com/bhargavrpatel/Dota-2-Sublime-Packages Sublime Text 2/3 Snippets for all functions]


== See Also ==
== See also ==
[[VScript]]
[[VScript]]
{{shortpagetitle}}
[[Category:Dota 2 Workshop Tools]]
[[Category:Scripting]]

Latest revision as of 01:47, 20 March 2024

English (en)Русский (ru)中文 (zh)Translate (Translate)

Scripting in Dota 2 is handled by the VScript virtual machine using the Lua programming language. Lua will be launched at run time when Dota 2 loads your add-on and can manipulate most facets of the game. Scripts can control the events that happen in game modes, game rules, abilities, hero interactions, neutrals , AI, and many more.

Getting Started

The documentation presented here assumes basic knowledge of Lua. If you're new to programming and Lua it's worth spending some time at the official Lua website learning some of the basic concepts. Additional resources are available at the bottom of the page for new users.

Scripting Abilities

Common Techniques

Reference

Examples

Lua Resources

See also

VScript