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.

File Structure

From Valve Developer Community
Jump to: navigation, search

English (en)русский (ru)
Edit

After an addon has been created two directories with the desired addon name will be created under the content and game directories. Both of these directories are used when developing addons. The Dota 2 Workshop Tools expect these directories to exist and will not function properly outside of these locations.

All of your files should be saved to one of these locations depending on what type of content it is.

Remember to use lowercase only or bad things might happen.

Content

All raw source content should be placed into the /content directory. This includes things like images, maps, and model files. These tend to be files created or modified with various software packages.

Content File Type Examples
Location

🖿<dota2dir>\content\dota_addons\your_addon_here\

Game

Compiled files that have been generated from source material or files that are read by the game at run time are located in /game. The tools will automatically compile new files it finds in the /content directory and place them in the /game directory.

Note.pngNote:There are some files that are only saved to /game such as Lua scripting files.
Game File Type Examples
Location

🖿<dota2dir>\game\dota_addons\your_addon_here\

Asset Organization

All assets should be organized into sub directories within the addon. Not only is this a good practice to start early but tools expect default locations for particular assets. These should be identical in both the "game" directory and "content" directories.

Included here are common paths for most assets. If unsure, refer to the "dota_imported" directory for examples.

  • 🖿your_addon_here\maps
  • 🖿your_addon_here\materials
  • 🖿your_addon_here\materials\models
  • 🖿your_addon_here\models
  • 🖿your_addon_here\particles
  • 🖿your_addon_here\resource
  • 🖿your_addon_here\scripts
  • 🖿your_addon_here\scripts\vscripts
  • 🖿your_addon_here\soundevents
  • 🖿your_addon_here\sounds