nyuuzyou/wikis huggingface dataset:
Dota 2 Workshop Tools/Scripting/Getting Started

__TOC__All of Dota 2 Workshop Tools scripting for addons is handled in Lua. If you're familiar writing script or code in another language then writing concepts in Lua will likely be fairly straight forward.
== Required Files ==
The following file must be present to have it start running a script. This file must live in the /game directory of the addon and is executed at run time when the addon loads.
../game/dota_addons/your_addon/scripts/vscripts/addon_game_mode.lua
This file is not optional and is restricted to the provided name. Additional files can be created and referenced from any point inside /vscripts of course and can take on whatever organization method preferred.
== Running Script Files ==
When loading an addon the addon_game_mode.lua script file will be executed immediately. Additional script files can be loaded along with addon_game_mode.lua by using 
require( "lua_filename_here" )
== Required Script Functions ==
There are some reserved function calls made in every addon that should be observed.
=== Precache ===
The Precache function will load all required assets in advance of them being required by the game. The example below includes three types of resource precaching. A specific particle file, a particle folder which will load all particle files in that folder, and a specific item.
function Precache( context )
	PrecacheResource( "particle", "particles/items2_fx/veil_of_discord.vpcf", context )	
	PrecacheResource( "particle_folder", "particles/frostivus_gameplay", context )
	PrecacheItemByNameSync( "item_bag_of_gold", context )
end
=== Activate ===
The Activate function is used to setup the game mode for the first time. It is run when the file is loaded and is generally used to setup classes for the game mode to utilize.
function Activate()
	GameRules.holdOut = CHoldoutGameMode()
	GameRules.holdOut:InitGameMode()
end
Category:Dota 2 Workshop Tools
Dota 2 Workshop Tools/Scripting/Simple Trigger that calls Lua

* Step 1: Create a box with the block tool (). Make sure you have the "toolstrigger.vmat" material selected. This box will serve as the trigger area.
* Step 2: Select the box and go to Tools > Tie To Entity (). This will create a trigger entity that is tied to your box.
* Step 3: Select the trigger and change its class to "trigger_hero". This trigger is meant to be used for when a player enters or leaves the trigger area. There are many types of triggers, but let's keep it simple for now.
* Step 4: Set a name for your trigger, and set the path to the script file you want to call functions from. Example: If you want to call a function from scripts/vscripts/my_file.lua when the trigger fires, you should set Entity Scripts: my_file.lua
:
* Step 5: With the trigger selected press to open the Object Properties window, then select the Outputs tabs.
* Step 6: Add an output named "OnStartTouch". Set the trigger as the target. The input should be "CallScriptFunction" and the parameter should be the name of the function you want to be called (e.g. OnStartTouch or OnEndTouch).
::
	My Output 	Target Entity	Target Input 	Parameter 	Delay	Only Once
	OnStartTouch	trigger_name 	CallScriptFunction	MyFunction	0.00 	No
* Step 7: Add another output with the same values, but the name should be "OnEndTouch". You probably want to set a different function name as well.
Example lua code:
function OnStartTouch(trigger)
	print(trigger.activator)
	print(trigger.caller)
	
end
function OnEndTouch(trigger)
	print(trigger.activator)
	print(trigger.caller)
	
end
Category:Dota 2 Workshop Tools Category:Scripting
Dota 2 Workshop Tools/Scripting/Using CreateHTTPRequest

Here's an example of using CreateHTTPRequest to fetch a URL. CreateHTTPRequest returns a CScriptHTTPRequest object the most important function of which is Send( completionCallback ). This example creates the request and immediately sends it with a completion routine that simply prints the resulting data.
CreateHTTPRequest( "GET", "http://www.google.com" ):Send( function( result )
	print( "GET response:\n" )
	for k,v in pairs( result ) do
		print( string.format( "%s : %s\n", k, v ) )
	end
	print( "Done." )
end )
Category: Dota 2 Workshop Tools
Dota 2 Workshop Tools/Unofficial Tools

These tools have been created by members of the modding community and are not supported by Valve.
== KeyValue files ==
* DotaCustomFilesJoiner
* KVFilesBuilder
* Syntax highlighting and snippets for Sublime Text 2/3
* KVLib: A C# Key-Value parser and library
* KVLib: A C++ Key-Value parser and library
* dotakv: parse and load KV ingame, save and load files
* UpgradeableItemsKVBuilder
* keyval-mode.el: An Emacs major mode for editing KeyValue files
== API related ==
* API snippets for Sublime Text 2/3
* Lua API stub classes
* VConsole2 Lib: PoC library for working with the VConsole2 network protocol
== Editors ==
* Simple Dota 2 Editor: Open source Dota 2 Mod Editor
* WorldSmith: Open source Dota 2 Mod Editor
== Lua libraries & frameworks ==
* Barebones
* Building Helper Library
* Player Say: Scaleform Lua for chat
== Misc ==
* D2 ModKit: A GUI comprised of useful tools to help with Dota 2 modding
* Source 2 Resource Decompiler
* Dota2 Sound Editor Note: This project is dead and is no longer being developed.
* KVUP: Tool for aiding with the porting of WC3 Models to Dota2
* ModDota Lib: A Flash library for Dota 2 custom gamemodes
* Source 2 resource file format parser and decompiler
Category:Dota 2 Workshop Tools
Dota 2 engine branch (Source)

The was introduced in 2013 with the release of . It used to be the latest branch available, succeeding the , but in the 2015 Reborn update, the game was upgraded to the then-new engine, which makes CS:GO the latest Source 1 branch available. Additionally, this is the only Source 1 engine branch that was never licensed to third-party developers. 
== Features ==
New since the is:
; Cloth simulation
: Real-time cloth simulation (i.e. soft-body physics).
; Global lighting
: The world is lit and shadowed dynamically with (in addition to pre-compiled light).
; Steamworks integration
: Building upon community-driven features from players will be able to share strategy guides and coach newer players through Steamworks.
; MultiBlend Textures
: 4-way texture blending, upgrading/replacing WorldVertexTransition
; Screen-space Anti-aliasing
: Anti-aliasing for use with deferred shading
; Screen Space Ambient Occlusion
: Ssao post-process shader
; Published demo file format
: Dota 2 Demo Format contains a link and instructions for parsing the Dota 2 demo files
; Custom Addon Support
: See the Dota 2 Workshop Tools for more details.
== Availability ==
* (formerly, uses since the Reborn update.)
== See also ==
*Dota 2 engine branch (Source 2)
*
*
Dota 2 engine branch (Source 2)

== Features ==
These are the features introduced since Reborn update in 2015, which ported the game to engine.
; Panorama UI
; 64-bit support
: Allows the game to use more than 2-4GB of system RAM and better performance.
; DirectX 11 (D3D11) and Vulkan support.
: Adds support for newer versions of Direct3D, aswell as new renderer "Vulkan", allowing the game to have better graphics/performance. Direct3D 9 and OpenGL continued to be supported in Dota 2 until 2021.
; Physically Based Rendering support.
; Volumetric lighting support.
Dota Underlords

is a Auto Battler game. It is the only game to be released on mobile devices (, ).
== Features ==
*Mobile support (, )
== Development ==
Following a very short development period of a few months, it was released as a Closed Beta to all Battle Pass 2019 owners on June 13, 2019.
== System Requirements ==
On -based operating systems, requires -capable GPU.
== External links ==
* Official Blog post announcing the game
Dr. Eli Vance

Doctor Eli Vance is a scientist who survived the Black Mesa incident. The first encounter with him was in Half-Life, when he sent Gordon for help shortly after the initial resonance cascade. (According to what he says himself, he was the scientist that assisted Gordon by using the retinal scanner, allowing him access to the Anti-Mass Spectrometer control room.) After that he took with him all that he managed to carry out of Black Mesa: His daughter Alyx, and a photo of his wife, Azian.
After the Seven Hour War, he joined (and probably led, seeming he was vital to capture for the Combine) the resistance, and was working with Dr. Judith Mossman to set up a teleporter together with Dr. Isaac Kleiner when Gordon arrived at Black Mesa East.
Eli is very important for the vortigaunts, probably for uniting the vortigaunts with the humans: he was the first human to collaborate with the vortigaunts, and has since earned their trust and is viewed as indispensable to the liberation. They praise him and believe he "almost perceives the All-in-one" (possibly their god?).
According to Dr. Breen, the Combine could conceivably have captured Eli at almost any time in the last several years, but the Combine probably recognized the importance Eli had for the unity between the vorts and the human race, and knew that a capture of him would not lead to much. Instead they used Dr. Mossman to try persuade him into the Combine way of thinking and convert him to join the Combine of his own free will instead, to demoralize and dissolve both the vortigaunt and human resistance.
He is the father of Alyx Vance, whom he can't stand to lose.
Eli is killed by an advisor at the end of Half-Life 2: Episode Two, however this is retconned at the end of Half-Life: Alyx, where via help from Gman, Alyx from the past travels to the present to kill the advisor, saving Eli.
== Trivia ==
* Dialogue in implies that Dr. Eli Vance is the "Luther" skin for the generic scientist in and its expansions, similarly to how Dr. Kleiner is based on the "Glasses" skin.
== See also ==
* npc_eli
== External links ==
* on the Combine OverWiki
Category:Half-Life Continuity
Category:Characters
Dr. Isaac Kleiner

Doctor Isaac Kleiner used to work in the Black Mesa Research Facility. Kleiner appears in Half-Life 2 and its episodes. Since the surrender of earth, he has been aiding the resistance through working on local-world teleportation technology in a secret lab. He also put some time aside to upgrade Gordon's HEV suit.
Dr. Kleiner keeps a de-beaked headcrab that he named after the actress and inventor Hedy Lamarr. During the teleportation incident in "A Red Letter Day", Lamarr jumped into the teleport and got teleported away to a barren wasteland, but she was later back at the lab (peeking in at Dr. Kleiner's feet as he opens the door) a week later when Gordon and Alyx returned from Nova Prospekt. As Dr. Kleiner said that there is no one like Lamarr, it is unlikely that it had been replaced by a new de-beaked headcrab, so how Dr. Kleiner and Lamarr found each other again remains a mystery to this day. In Half-Life 2: Episode Two, Lamarr is seen jumping into the rocket hatchet. It's possible that she created the 8-pound payload anomaly mentioned by Kleiner. If that's the case, she is probably dead in outer space with a gnome.
==Speeches==
======
==See also==
* 
* 
Category:Half-Life Continuity
Category:Characters
Dr. Judith Mossman

Category:Half-Life Continuity
==Summary==
Dr. Judith Mossman is a scientist who plays an integral role in the Half-Life 2 series. She is a cunning and manipulative triple agent, aiding both sides during the Uprising but eventually siding with the Resistance. Later on she discovered a secret and powerful project that could be used against the Combine, in a vanished ship named the Borealis.
==Speeches==
======
From ep2_outland_11b
I'm fairly sure I've pinned down the location of the Project. It's hard to say how much of it might have survived intact, or whether there's anything remaining that could compromise our work... if it were discovered by the Combine. We'll need to take a close look at it, of course, but I should be able to give a better opinion within a few hours. If the site is where we think it is, then it should be no more than... What's that? I'm going to cut this short. We may have been spotted.
==See also==
* Dr. Eli Vance
* npc_mossman
Category:Characters
DrawGetTextureId

=int ISurface::DrawGetTextureId( char const *filename )=
Use this function before CreateNewTextureID to make sure you don't reference the same material with multiple texture IDs.
==Sample==
 currentId = surface()->DrawGetTextureId( texturename );
 if ( currentId == -1 )
 {
 	currentId = surface()->CreateNewTextureID();
 	surface()->DrawSetTextureFile( currentId, texturename, false, true );
 }
Category:ISurface
DrawSetTextureFile

=void ISurface::DrawSetTextureFile(int id, const char *filename,int hardwareFilter, bool forceReload)=
Use after CreateNewTextureID to set the material referenced by a specified ID.
;int hardwareFilter:This integer has no effect on the ID produced.
;bool forceReload:This boolean tells ISurface to reload the material if it's already contained in the specified ID. If the material isn't in the specified ID, it will load the material no matter what forceReload is set to.
==Sample==
 currentId = surface()->DrawGetTextureId( texturename );
 if ( currentId == -1 )
 {
 	currentId = surface()->CreateNewTextureID();
 	surface()->DrawSetTextureFile( currentId, texturename, false, true );
 }
==See also==
* DrawSetTextureRGBA
Category:ISurface
DrawSetTextureRGBA

=The function=
 void ISurface::DrawSetTextureRGBA( int id, const unsigned char *rgba, int wide, int tall, int hardwareFilter, bool forceReload ) = 0
This is a function that you should use to draw raw RGBA data to the HUD, for example when you are rendering a mask.
==Sample==
===Initialization===
 #define HEIGHT 256
 #define WIDTH 256
 #define PIXEL_BYTES 4 // RGBA (never changes)
 unsigned char abPic[ HEIGHT * WIDTH * PIXEL_BYTES ];
===Raw Data===
 for (y = 0; y < HEIGHT; y++) // up/down traverse
 { 
 	for (x = 0; x < WIDTH; x++) // left/right traverse
 	{
 		int offset = (x + y * WIDTH) * PIXEL_BYTES;
 		char *dst = ((char*)abPic) + offset;
 					
 		dst[0] = (unsigned char)255;//red
 		dst[1] = (unsigned char)255;//green
 		dst[2] = (unsigned char)255;//blue
 		dst[3] = (unsigned char)255;//alpha
 	}
 }
===Set Up Texture ID===
 	m_iHudTexture = surface()->CreateNewTextureID(true);
 	surface()->DrawSetTextureRGBA( m_iHudTexture, (unsigned char*)abPic, HEIGHT, WIDTH, false, true );
 	surface()->DrawSetColor( Color( 255, 255, 255, 128 ) );
 	surface()->DrawTexturedRect( 0, 0, GetWide(), GetTall() );
==See also==
* CreateProceduralTexture
* CreateMaterial
Category:ISurface
Category:Developer Issues and Workarounds
Dreamball

is a platformer Source mod, based off of titles similar to Super Monkey Ball or Ballance. The player takes control of a huge marble as they roll it through the various unique and bright locations, the goal being to complete the level. The mod also features original music. Unlike Super Monkey Ball or Ballance, the mod isn't time-based (mostly) and has no HUD. This mod is only for single-player. A similar multiplayer gamemode was once available for .
== Links ==
* Former Official Website
* ModDB Link
* Former Level Submission
Dreamball:Creating Camera Collision

Creating a collision for the camera (the player's screen) is done by using the db camera collision entity. This is a brush-based entity. The player's camera won't collide with anything in the world, so you must place these brushes around in the places where you want the camera to collide.
You should place them in your map carefully, not everything needs to collide in the world. You should only make your main world geometry collide. The screenshot on the right is a good example of placing your collision, only the geometry textured in red will collide. It isn't necessary to make things such as the checkpoint model or the little blue poles collide. 
==Creating the collision==
To create them simply create your brush were you want the collision to be, then select the brush and press Ctrl + T to tie it to an entity. Tie it to the db camera collision. Texture your brush in the toolscameracollision texture.
:
Note; this texture is just a nodraw texture, you can really use nodraw if you want. We use this blue one simply to make it stand out from the world, so it is recommended you use it too. Just place your camera collision brush right over your real geometry. So in the screenshot, the brush with the red texture is actually 2 brushes, the normal world brush (the red brush) and the invisible (the blue one in hammer) collision brush lapped over it. So it's best you leave your collision till your map is finished, then copy / duplicate your world brush and paste them into the same spot and tie it to the collision. 
When you create your brushes you should add them to a custom VisGroup so you can filter them easily. Do note that you cannot use textures with transparency in them, so the camera collision (or nodraw) texture might make it harder to see your real world geometry, this is why you should use VisGroups. So you can easily turn of the collision so you can see and select your main world geometry.
===Camera collision for Displacements===
In Dreamball the camera is set to collide with all Displacements by default. If you want to make a displacement not collide with the camera then simply select your displacement and in the Hammer Face Edit Dialog under the Displacement tab there's a check box called 'No Hull Collision', by default for you this should be unchecked. Simply select your displacement brushes and check that box and the displacement will become not solid to the player's camera. Otherwise if it is left unchecked then it will collide, giving the same camera collision behaviour as the db camera collision entity.
==See also==
*Dreamball Level Creation
*db camera collision
*VisGroups
*"Dreamball Dev Kit/SDK_content/mapsrc/sdk_camera_collision.vmf" - an example map of camera collision usage.
Category:Dreamball
Dreamball:Creating Checkpoints

Creating checkpoints in your map is a simple process. You can use the checkpoint model seen
in the the official Dreamball maps by placing the prefabs/gameplay/checkpoint.vmf in your map. 
Or you can make your own which is a simple setup. 
The elements that make up the checkpoint are:
*db trigger respawn
*db trigger checkpoint
Both are trigger brush-based entities, simply create your brush with the tools/toolstrigger texture and tie the entity to it.
==db_trigger_respawn==
The db trigger respawn goes underneath your map (or just anywhere you want players to trigger a respawn). Place this brush in the areas where you want them to trigger the respawn. There's nothing you need to do else for this entity, just leave it there and it'll always trigger the respawns.
==db_trigger_checkpoint==
You place the db trigger checkpoint where you want to trigger a new checkpoint. If you don't have one of these triggers the game will just use your starting info marble start entity as a spawn point. Make one of these brushes where you want to trigger a checkpoint. Then place an info teleport destination where you want the respawn point to be and name it my_respawn_point. Now go inside your db trigger checkpoint and in the Respawn Point field type the name of your respawn point. In this case; my_respawn_point. Now when you start your map and roll into the db trigger respawn you will spawn at the starting spawn point. Now roll into the db trigger checkpoint and you will enable the my_respawn_point spawn so when you now roll into the db trigger respawn you will spawn at the my_respawn_point location.
You can place more db trigger checkpoint's in a linear fashion for enabling new checkpoints. Just simply make another db trigger checkpoint brush with another info teleport destination and name it my_respawn_point2. Now roll through this second db trigger checkpoint and your new spawn point will be my_respawn_point2.
If you want to use the checkpoint model we used in our maps, place the prefab "prefabs/gameplay/checkpoint.vmf" in your map. This prefab has the db trigger checkpoint in it and will be automatically used, just simply place this prefab in your map and your good to go. If you want to use a second checkpoint.vmf prefab, place the prefab again and rename the names to the next number in line so they're unique. So Cpoint1_target should be Cpoint2_target and same for the sounds/particles.
.
==See also==
*"Dreamball Dev Kit/SDK_content/prefabs/gameplay/checkpoint.vmf" - a pre-made checkpoint model already setup
*"Dreamball Dev Kit/SDK_content/mapsrc/sdk_checkpoints.vmf" - an example map of using checkpoint / respawn triggers
* db trigger respawn
* db trigger checkpoint
* List of Dreamball Entities
* Dreamball Level Creation
Category:Dreamball
Dreamball:Creating Fans

Fans in Dreamball are made up of a few base entities, nothing Dreamball-specific. They're basically a trigger_push brush to give the push effect. The rest of the entities aren't required but are essential to look like a fan. As it's just a simple trigger based brush, there's no point writing a page telling you how to make them as you can read all you need here. Instead, assuming you want to use the same fan model setup as the official maps, just go into "Dreamball Dev Kit/SDK_Content/prefabs/gameplay" and you'll find 2 prefabs named 'fan_with_switch.vmf' and '3_fans_with_switches.vmf'. You can use these in your maps. 
Note that if you place multiple instances of these prefabs you'll need to name the added ones again, uniquely. Also, if you rotate the trigger_push in your map you'll need to re-point the direction of the push. Do this by opening your trigger_push entity and in the Push Direction field point your fan with the black circle that has half a white line that is movable with your cursor. In your Hammer 2D grid named 'top (x/y)' use this as your direction base. Point the white line in the direction on the top 2D grid the way you want the trigger to push.
==See also==
* trigger push
* Dreamball Level Creation
Category:Dreamball
Dreamball:Creating a Jump Powerup

This page discusses how to simply enable a 'Jump Powerup' with the db powerup ability jump entity. If you'd like to use the jump changer we used in the official maps, place the "SDK_content/prefabs/gameplay/powerup_ability_jump.vmf" prefab in your map and it's ready to go.
For those who want to make their own for any reasons, the elements that make a jump powerup are as follows:
*A trigger brush - used for enabling the jump ability (you can use anything else that can fire outputs also).
*The db powerup ability jump entity - for enabling the powerup via input.
To make our jump powerup now, place a db powerup ability jump entity in your map. (this is a point entity) Now name it my_jump_powerup.
Now create a trigger brush for where we'll trigger the enable jump powerup event. In this trigger add this output:
:(or in any other entity that can add outputs)
::
	My Output 	Target Entity 	Target Input	Parameter	Delay	Only Once
	OnStartTouch	my_jump_powerup	Enable 	0 	0.00 	No
Now the player will equip the jump powerup on trigger. 
==See also==
*"Dreamball Dev Kit/SDK_content/prefabs/gameplay/powerup_ability_jump.vmf" - a ready made model switcher
*"Dreamball Dev Kit/SDK_content/mapsrc/sdk_jump_powerup.vmf" - an example map of enabling the jump powerup
*db powerup ability storer
*db powerup ability remover
*Dreamball Level Creation
Category:Dreamball