Common Fixes for New Custom Games

edited March 20 in Tutorials

I've had to start a few mods from scratch and these are some of the fixes that I have had to apply multiple times.

Recommended Fixes

  • Give players random heroes when the timer runs out.

By default, if a player fails to pick a hero before the timer runs out, they will be given no hero, meaning they cannot play the game. Instead, you should random a hero for the player when the timer runs out. Example of code to apply this fix https://github.com/dota2unofficial/12v12/commit/f7d872fdb10bcd7ae7a1559005259acaed5973a7

  • Show Players connecting at the start of the game

By default, custom games just show the hero pick screen with a timer, the list of connecting players and their status are hidden, this is a bug. The following code can fix this to show connecting players (Credits to EarthSalamander) https://github.com/dota2unofficial/overthrow2/blob/73d25ceffff3dcee0faa8272a7323ac35556bf7e/content/panorama/layout/custom_game/custom_ui_manifest.xml#L48

  • Enable Arcane Runes

They are not enabled by default, this is an easy way to add them into the game. https://github.com/dota2unofficial/12v12/commit/8fc2335379707db22de01317b3ba2869ba77badd

  • Enable Ban Phases and Leaver Penalty

If you want your game to have a ban phase, where teams can ban 1 or 2 heroes at the start add "EnablePickRules" "1" to the addoninfo.txt file. To enable the leaver penalty "PenaltiesEnabled" "1" and to automatically kick afk players add "CheckAFKPlayers" "1"

  • Give Courier to teams at the start

Custom games are usually pretty casual and it's very frequent for players not to buy couriers, its probably better to just give teams couriers to begin with. https://github.com/dota2unofficial/12v12/commit/49fa90249753d6ce17e334fa2570f765286a7717

  • Make Disable Help work against Tiny's throw

By default the disable help button does not work against Tiny's throw, which means Trolls love throw, this code prevents throwing if the player has disabled help selected against them. https://github.com/dota2unofficial/12v12/commit/8af0fa4a728a3cf05142d9d05280bce4dd47da75

Optional

  • Disable Pauses

If you dont want pauses in your game. Games with lots of players can be trolled with people pausing the game, especially if the game is short in nature and doesn't usually require pausing. https://github.com/dota2unofficial/12v12/commit/6753291dc1279e74efee7fb1d248cf26ddd79bb2

  • If you use multi-team scoreboard used in Overthrow, added disable help

The multi-team scoreboard doesn't have a disable help option, this code adds a checkbox next to players. https://github.com/dota2unofficial/12v12/commit/130fcf0ad9f7458cf145054660c89d60b398b29f

  • Stop players stealing items

A common troll tactic is to take other players items off courier or hide them places it, there is basically no reason for why players should be able to touch other players items so this code prevents that https://github.com/dota2unofficial/overthrow2/commit/37983b460e00a616a9cfd589e6bed3e9e14e829c

  • Disable Game setup phase

Sometimes people will unassign teams just to troll other players. The downside to getting rid of the game setup phase is that some people like to shuffle teams, especially private groups or streamers. https://github.com/dota2unofficial/overthrow2/commit/0f2dc65f9ef164cac973ab4b478018bdadd2dcdc