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.

Migrating a Custom Game From Alpha to Beta

From Valve Developer Community
Jump to: navigation, search

Where is my addon?

When you first launch the Dota 2 Workshop Tools Beta, you may notice your Custom Game is missing from the list.

Custom Games in the beta have a different working directory

Tools will not be able to see your Custom Game from the Dota 2 Workshop Tools Beta unless it is in the proper Custom Game directory. In order to migrate a Custom Game from the Dota 2 Workshop Tools Alpha to the Dota 2 Workshop Tools Beta, you must copy your Custom Game directory from the alpha to the beta location.

Copy the Alpha version of your Custom Game from here:

steamapps\common\dota 2 beta\dota_ugc\content\dota_addons\<mycustomgame>
steamapps\common\dota 2 beta\dota_ugc\game\dota_addons\<mycustomgame>

To the Beta version here:

steamapps\common\dota 2 beta\content\dota_addons\<mycustomgame>
steamapps\common\dota 2 beta\game\dota_addons\<mycustomgame>

New custom game upload tool

In the Dota 2 Workshop Tools Alpha, upload of the Custom Game was handled through the in-game Workshop Menu. This required a re-launch into Dota 2. Now, you can upload your Custom Game directly from the tools without having to relaunch.

  • There is a new Workshop Manager tool accessible from the Asset Browser
  • You can manage and upload all of your Custom Games from this tool

New Panorama UI for Custom Games

The main dashboard of Dota 2 has now moved to the Panorama UI framework.

We will be deprecating the use of Scaleform for Dota Custom Games.

While Scaleform UI in Custom Games is supported in this release, it is recommended that Custom Game UI move to Panorama to take advantage of the latest updates.

  • See the panorama documentation here: Panorama
  • See the Overthrow Custom Game included in dota_addons folder

32-bit considerations

Custom Games in the Dota 2 Workshop Tools Alpha ran primarily on 64-bit platforms. In order to be able to support more users, we've enhanced our 32-bit support for the Beta.

  • When launching the Beta, the default will be to launch the 32-bit executable. This is to ensure your Custom Game runs on 32-bit platforms.
  • Keep close track of your memory usage. Anything approaching the 2gb mark is going to be problematic on 32-bit platforms.
  • Avoid precaching folders with many assets if you're not going to use most of them
    • This can eat up precious address space
    • This can also cause a failure to send the precache list to remote clients

Custom Game Considerations

  • Team selection is no longer handled in the lobby. It is new state that happens after entering the game, but before hero selection
    • It is intended to be used for team selection, mode voting, etc.
    • See the included Overthrow addon as an example of how to create a custom team selection UI.
    • Custom Games that do not implement their own team selection UI will be given a default one
  • Custom game player IDs aren't guaranteed to follow the 'TeamPlayer' convention that normal Dota does (where Radiant+Dire players have IDs 0..9)
  • Added game events 'dota_team_player_list_changed' (fired when player count or team assignment changes) and 'dota_player_details_changed' (fired when playerid or name changes)
  • The ReplaceHeroWith function now puts the new unit at the current (to be replaced) unit's origin, instead of spawning it on a player_start location.
  • Calling SetOrigin no longer cancels teleports on Dota NPCs
  • While most lua scripts from the Alpha Custom Games should just work, there may be cases where your script does not behave in the Beta as it did in the Alpha. If this is the case, the first thing to look at is the VConsole2 output.

Team Configuration

Custom Games that require specific team configurations can now handle this through the following two modifications:

Specify the maximum players per map in the addoninfo.txt

"AddonInfo"
{
	"TeamCount" 	"10"
	"maps"		"forest_solo desert_duo mines_trio"
	"IsPlayable"	"1"
	"mines_trio"
	{
		"MaxPlayers"	"9"
	}
	"desert_duo"
	{
		"MaxPlayers"	"10"
	}
	"forest_solo"
	{
		"MaxPlayers"	"10"
	}
}

Specify how many players go on each team in the addon_game_mode.lua script

GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_GOODGUYS, 5 )
GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_BADGUYS, 0 )

For more advanced team configuration options see Custom Game Setup

Resource Format Changes

The formats for some resource types changed between Alpha and Beta.

  • Particles are the only resource for which the content-side format has changed.
    • Use vpcf_to_kv3.exe to convert your old particle systems to the new content format:
    • From a windows command line in your content/dota_addons/ADDON_NAME/particles folder, run: C:\INSTALL_LOCATION\game\bin\win64\vpcf_to_kv3.exe -r *.vpcf
    • This will modify your VPCF files in place and convert them to the new file format. ("schema text" format is being deprecated in favor of the simpler "keyvalues 3" format.)
  • Textures, Meshes, and Sounds: These will automatically recompile to the new formats when accessed in tools mode
  • Currently, all resource loaders are backwards compatible and support loading the old formats