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

  • 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)

  • Enable Arcane Runes

They are not enabled by default, this is an easy way to add them into the game.

  • 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.

  • 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.


  • 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.

  • 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.

  • 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

  • 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.