Dota DIY: How to create custom game mods

posted by Vekus, 332 days ago
DotA is old, older than some of you might imagine. Starting as a Warcraft 3 mod, it now returned to its roots. Dota 2 mods were here for quite a while but now the custom gamemods are back with a VENGEANCE. You want to know how to create epic maps and modes on your own? Here's how.


A short look into the past...

Defense of the Ancients, the original DotA, started in 2003 as a Warcraft 3: Reign of Chaos mod developed by Eul after the archetype Aeon of Strife in Starcraft. The transition over to Warcraft 3: Frozen Throne was made by Guinsoo, who changed the name to Dota Allstars. In 2005, IceFrog was added as developer into the team and took over the lead by Dota Allstars 6.01. The game grew massive as it gathered millions of people in it which culminated to Valve hiring Icefrog in 2009 and releasing the Dota 2 beta-version in late 2010.


Ye olde Dota allstars (Image courtesy of Kunkka)


Nearly all old school players made the transition really quick and due to both word of mouth and Valve's marketing, a lot of new players took interest into Dota as well. Dota 2 as of now is a stand-alone game, but there are a lot of people who wish back for the times that there were modded versions of the mod. The different Warcraft cards, some Dota based, others not, made it really enjoyable watching your heroes compete in another mode than the classic 5on5. For a long time, this feeling was gone for the majority of the players, that could only play other modes in official events such as Diretide and Frostivus. As of late, however, Valve changed their code which makes it possible to both create and play your own custom maps again. You want to know how? Continue to read.


A short history of modding...

Dota 2 modding is a little bit older than depicted in the introduction. Pretty much since the release of the game people modified textures, models and sounds ingame. The modifications ranged from the sound associated with Sand King’s Sandstorm to Darude: Sandstorm over giving Juggernaut a green lightsaber, to change the model of Io to つ ◕_◕ ༽つ Give Diretide.
The gameplay however was unaffected by this, since all of these mods only took place on the modder's computer and didn´t affect the gameplay in any way.

Early last year however, D2Ware and Sourcemod.js opened a way for javascript-based coding of custom game modes, with a lot of popular Dota-like game modes becoming possible. People could finally play Legends of Dota or simplified Pudge Wars again.

Sourcemod.js was a welcomed addition, however it came with a lot of flaws. Dota 2 updates affected the code and broke features of the modded games resulting in downtime where players couldn´t connect to modded games. Additionally, many things weren´t moddable, including art or audio assets.

As of late however, Valve hopped in on modding as they released their own gamemode Frostivus, together with the public activation of the so called Vscript engine in Dota 2, which allows mods to be written as addons in Lua. Since then, a lot of dedicated people worked hard to document commands and data structures and create tools to both play and create your own custom maps.


Pudge Wars, now available in Dota 2! (Image courtesy of Fubar; Reddit/D2Ware)


The following guide will explain in detail how to play custom maps and design your own. It will walk you through the setting up of the Dota 2 SDK and creating your first addon complete with original map, custom items and abilities and custom Lua code to organize the gameplay.

While the main content will be rather simple, some basic computer knowledge is needed. For other topics (such as movement in HAMMER, or using the Source Model Viewer), there will be references to other guides.

How to PLAY custom maps:



If you aren´t too much into modding but you still want to play custom maps and game modes, the process for doing so is quite simple. Join Penguinwizzard and Co on their IRC channel (Click here to join ) where they will post addons and servers for you to test.


Installing an addon is an easy task as you just have to install it into C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota\addons as displayed in the image.



How to CREATE custom maps:



Setup for SDK

The first section of this guide will include the setup for the SDK and get you ready with Hammer and the basic tools of the SDK. This section will require you to pay attention, since small errors can lead to cryptic failures. If you need some help you can always visit Penguinwizzards helpdesk , where you will be helped by Penguinwizzard & Co.

The first step you will have to take is downloading all of the required tools. These consist of Alien Swarm SDK, UpVersion, the Dota 2 FGD, GCF Scape, Notepad ++ and River of Souls, a common testing map. For your convenience, the links to download each tool are listed below:

Alien Swarm SDK (can installed directly from Steam, Steam Link)

steam://install/640 or the full Alien Swarm here


UpVersion http://d.pr/f/OYJ6 or just click here

Dota 2 FGD https://github.com/dota2modders/dota2fgd/archive/master.zip or just click here

GCFScape http://nemesis.thewavelength.net/index.php?p=26 or just click here

Notepad++ http://notepad-plus-plus.org/download/v6.5.3.html or just click here

River of Souls https://github.com/Z-Machine/RiverOfSouls/archive/master.zip or just click here


After you manage to download all of these, it will be time to run the installers for both GCFScape and Notepad++. For now they won´t be needed, but GCFScape will be used to unpack files to use them in the editor and with Notepad++ reformatting will be quite easy.
The rest of the files should be put into an easily accessible file, since they will be needed later.

Now that you have done that, navigate to the "steamapps\common“ directory. By default it will be located at C:\Program Files (x86)\Steam\steamapps\common but it can vary a bit, depending on your Steam setup. The folder should contain the two sub-folders: alien swarm and dota 2 beta, amongst a few others, depending on which games you have installed. Now it is time to create a new folder here, named „dota 2 sdk“, as displayed in the image.



Now, the task will be making the "dota 2 skd" folder like the alien swarm one. Both games are really similar and the maps can be conversed into each other, if done carefully. First, copy all of the contents from the "alien swarm" folder into "dota 2 sdk".




It should look like this right now


The games might be similar, but you still have to put in the Dota 2 content as well. Valve however packed them together in a vpk file named pak_01 to shorten loading times. To unpack them, GFCScape will be needed. Open pak_01dir.vpk with it (you can find at C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota\pak01_dir.vpk) , which will result in a view which should look like this:



The files shown in the image are the core data files for Dota2. They will be needed, since both Hammer and SDK prefer uncompressed files over compressed ones. To unpack them, rightclick on the folder named „Root“ and then click on "extract". There should pop up a window where you can navigate to the "dota 2 sdk" folder and select it.



With this, you have created a folder called „root“ into the „dota 2 sdk“ folder containing the unpacked files from the "pak_01dir.vpk". Now go back towards the „dota 2 beta“ folder and copy "gameinfo.txt" from "dota 2 beta/dota" to "dota 2 sdk/root".

After you have done this, it will be time to change some directories. Rename the folder "root" to "dota" in your "dota 2 sdk" folder. Now select the freshly renamed folder and create a new folder in there, called "maps".



CAREFUL!
Creating the folder "maps" is really important, otherwise Hammer will crash later on without a warning!

Now it is time to copy over the tools you downloaded in the beginning. UpVersion.exe goes in dota 2 sdk/bin/, and the files from the dota 2 fgd zip, dota2.fgd and base.fgd, also go into dota 2 sdk/bin/ (base.fgd will overwrite the existing base.fgd file here). The FGD files describe to the SDK what entities are in dota 2, as well as their properties, so that the editors know how to deal with all of them and how to correctly display dota VMF files. The last file you have to change manually is dota 2 sdk/bin/GameConfig.txt . Open GameConfig.txt with a text editor, and replace all the text inside it with the following:



"Configs"
{
"Games"
{
"Dota 2"
{
"GameDir" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\dota"
"Hammer"
{
"GameData0" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\bin\dota2.fgd"
"TextureFormat" "5"
"MapFormat" "4"
"DefaultTextureScale" "0.250000"
"DefaultLightmapScale" "16"
"GameExe" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota.exe"
"DefaultSolidEntity" "func_brush"
"DefaultPointEntity" "info_player_start"
"BSP" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\bin\vbsp.exe"
"Vis" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\bin\vvis.exe"
"Light" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\bin\vrad.exe"
"GameExeDir" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta"
"MapDir" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\dota\maps"
"BSPDir" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota\maps"
"PrefabDir" "C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\dota\maps\prefabs"
"CordonTexture" "BLACK"
"MaterialExcludeCount" "0"
}
}
}
"SDKVersion" "4"
}




CAREFUL!
This configuration is written for the standard steam directory. If you for some reasons don´t use the default settings, change the path to the "dota 2 beta" and "dota 2 sdk" folders.


Now that you have setup the directories for the SDK, it is time to add it to the Steam library. To do this, open the library and click on the "Add Game“ button in the bottom left corner and select "Add a Non-Steam Game“.


In the window that comes up, select “Browse”, and navigate to the file C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\bin\SDKLauncher.exe .



Click on “Add Selected Programs” and you will add the SDK Launcher to your steam library. Select it in your library, rename it if you’d like, and hit “Play”.




Now a window should appear, similar to the picture at the right, just without the details. Don´t get distracted by the name Alien Swarm Authoring Tools, you are modding for Dota 2 as confirmed by the game configuration at the bottom.


The only thing left to do will be basic configurations as well as testing them. For this purpose, you have downloaded the testmap RiverOfSouls.vmf in the beginning. Copy the contents of the River of Souls package to "dota 2 sdk/dota/maps"(resulting in the structure below) and then use rightclick->open in Hammer to open RiverOfSouls.vmf.




If you did everything right up to this point, you should get pretty much the same image as shown above. Congratulations, you are almost a modder. For testing your configurations, go to File->Run Map. Now you will be presented an options screen. Press the expert button to get all available options. The image below should look exactly like your options list.


Left: Normal Run Map Menu; Right: Expert Run Map Menu


The expert menu will allow you to configure things exactly like you want them, and this will be the first thing you have to do as well. For this, UpVersion.exe will be needed.
Why? Valve hasn´t released a tool yet, that allows to generate valid Dota 2 maps. UpVersion.exe will transform an AlienSwarm map into one suitable for the Dota client. It is designed to be put into the map build process after the alien swarm tools have finished running, so that it can then modify the map file before it is sent to the game.

Below are the entries that should be in the “Compile/run commands” list:

1. Command: $bsp_exe
Parameters: -alldetail -game $gamedir $path\$file
2. Command: $vis_exe
Parameters: -radius_override 2500 -game $gamedir $path\$file
3. Command: $light_exe
Parameters: -game $gamedir $path\$file
4. Command: C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\bin\UpVersion.exe
Parameters: $path\$file.bsp
5. Command: Copy File
Parameters: $path\$file.bsp $bspdir\$file.bsp

CAREFUL!
A few parameters have $path\$file, while others have $path\$file.bsp. Don´t mess them up, otherwise you will get errors.

If you have done all the configurations, make sure that "Wait for keypress when done compiling" is checked and press "Go!". The build window should popup and some text will be displayed. If warnings about textures pop up, simply ignore them. Once it is finished, you should get a window like displayed below:



You got this? Hooray! You successfully set up the SDK and built a Dota 2 map! You want to play it? Okay. First of all copy Riverofsouls.gnv from dota2 sdk\dota\maps\ to dota2 beta\dota\maps; without this file, Dota considers you off the map and your orders invalid.

Now open up Dota 2 and go into the console. The map can be loaded with the command "map riverofsouls.bsp" . To join a team, enter "jointeam good" or "jointeam bad".


If you are having unfixable problems with your setup process, you can contact the helpdesk of a passionate modder group at their site. However, try a little bit on your own, because it will help you getting experience as well as reducing the average wait time for help.

Advanced settings and textures

The advanced section will cover one of the main issues with Hammer: it can´t read the textures of the models as seen in the image below. Instead it will just show wireframes.




No textures now...just wireframes


This issue can be fixed rather easily but involves changing a lot of files. To make this as little time consuming as possible, you will need Notepad++. To avoid problems, close Hammer and open up Notepad++. You should get the starting window, as shown below.



On the top bar, hit “Search”->”Find In Files…”. On the window that opens up, you want to put in the following settings:

Find: GlobalLitSample
Replace with: VertexLitGeneric
Filters: *.vmt
Directory: C:\Program Files (x86)\Steam\steamapps\common\dota 2 sdk\dota\materials





The Find in Files window with the correct settings input


Once you have done this, hit the button that says "Replace in Files". Don´t worry if Notepad++ isn´t responding. It will take a minute or two and it is working. As soon as it is finished, go back to Hammer and load Riverofsouls.bsp . If done right, all models should be textured and looking as beautiful as in the image below.




Give yourself a pat on the back, kid... You made it


This is the first article of many introducing custom maps and how to create them



Sources: Penguinwizzards modding Guide, If not stated otherwise all images are courtesy of Penguinwizzard

 
1

#1
Bumbatz wrote at 21.01.2014, 10:54 CET:
:^)
#2
isbunk wrote at 21.01.2014, 10:57 CET:
wow, what an excellent article. gj jd! thank you for this
#3
wrote at 21.01.2014, 10:57 CET:
Warcraft 4!!! Or the real sequel to Brood War!!!
#4
wrote at 21.01.2014, 10:59 CET:
Wow, the new JD writers are really, really good. I hope you guys are getting paid for your work, else this is another sad story of esports companies conning gullible young talent to work for them for free on the promise of !$ESPORTS$!.
#5
seklis wrote at 21.01.2014, 11:02 CET:
AoS was a map for Starcraft, not SC2 though
#6
Avazaladore wrote at 21.01.2014, 11:02 CET:
COOL
#7
Herman wrote at 21.01.2014, 11:03 CET:
Great
#8
josipinho93 wrote at 21.01.2014, 11:03 CET:
jesus, nice work on the article, rly nice work
#9
TobiWanKenobi wrote at 21.01.2014, 11:14 CET:
There are more of these to come, and for those looking to showcase their creations we will be making a youtube series for Custom Map creators.

Always loved custom maps and I know personally, I have the wish for it to be a huge part of the scene (as really it was where DOTA was born)
#10
romski wrote at 21.01.2014, 11:14 CET:
lilopuppy wrote:
Wow, the new JD writers are really, really good. I hope you guys are getting paid for your work, else this is another sad story of esports companies conning gullible young talent to work for them for free on the promise of !$ESPORTS$!.


+1
#11
ASHLEY_TISDALE wrote at 21.01.2014, 11:15 CET:
Can someone PLEASE create Pudge Wars :] ?
#12
Malystryx.GDS wrote at 21.01.2014, 11:17 CET:
I want Run Kitty Run or Poke the Ogre from Warcraft3 ^^
#13
Doing My Best wrote at 21.01.2014, 11:21 CET:
2 much manipulations.
#14
Vekus wrote at 21.01.2014, 11:28 CET:
seklis wrote:
AoS was a map for Starcraft, not SC2 though


Fixed, ty
#15
Tumatauenga wrote at 21.01.2014, 11:31 CET:
SOMEONE REMAKE ISLAND DEF!
#16
go-freeway wrote at 21.01.2014, 11:34 CET:
too long
#17
Jirator wrote at 21.01.2014, 11:41 CET:
I ask you a question... Is this supported by Valve? I just wonder. I hope there is some blog statement about custom maps comming soon to dota2 blog. I really am looking forward to custom maps. Unfortunately this is not the most user friendly manual I have ever seen :D Anyway good job JD and thanks for sharing.
#18
frostmourne240 wrote at 21.01.2014, 11:58 CET:
Too. much.......information.....can't ... pr..process

PS.
MAFA TD/ Tropical Wars/ Mu/ Anime Wars ...pls
#19
Glodar wrote at 21.01.2014, 11:58 CET:
Nice post,gj.
#20
atph120890 wrote at 21.01.2014, 12:01 CET:
༼ つ ◕_◕ ༽つ Give Pudge wars, X hero Siege ( Kinda like wraith night ) , Mad balls arena, warChasers, Castle defense ... ( thats all i remember ? ) :D
#21
temez wrote at 21.01.2014, 12:18 CET:
romski wrote:
lilopuppy wrote:
Wow, the new JD writers are really, really good. I hope you guys are getting paid for your work, else this is another sad story of esports companies conning gullible young talent to work for them for free on the promise of !$ESPORTS$!.

+1


+1
#22
artonico wrote at 21.01.2014, 12:24 CET:
Me want Element TD and Fight of Characters(FoC)/Destiny Arena :3
#23
admiralsf wrote at 21.01.2014, 12:27 CET:
its havnt ban ?
external software and steam can ban idis or its approve form valve ?
#24
Gurkenhans wrote at 21.01.2014, 12:36 CET:
easy
#25
daNny5 wrote at 21.01.2014, 12:38 CET:
ICE ESCAPE PLEEEEASE!!!
 
1
 

You are not logged in! To become part of the awesome, create your GameSports account here.