Customizing hero selection screen

How do I choose what hero can be picked? Like in pudge wars or sniper duel where you can only pick pudge or sniper.

Comments

  • Posts: 15

    Nvm I found out

  • Posts: 203

    In \game\dota_addons\YourAddonName\scripts\npc, you need to create a file named herolist.txt

    "CustomHeroList"
    {
      "npc_dota_hero_ancient_apparition" "1"
      "npc_dota_hero_antimage" "1"
      "npc_dota_hero_axe" "1"
      "npc_dota_hero_bane" "1"
      "npc_dota_hero_beastmaster" "1"
      "npc_dota_hero_bloodseeker" "1"
      "npc_dota_hero_chen" "1"
      "npc_dota_hero_crystal_maiden" "1"
      "npc_dota_hero_dark_seer" "1"
      "npc_dota_hero_dazzle"  "1"
      "npc_dota_hero_dragon_knight" "1"
      "npc_dota_hero_doom_bringer" "1"
      "npc_dota_hero_drow_ranger" "1"
      "npc_dota_hero_earthshaker" "1"
      "npc_dota_hero_enchantress" "1"
      "npc_dota_hero_enigma" "1"
      "npc_dota_hero_faceless_void" "1"
      "npc_dota_hero_furion" "1"
      "npc_dota_hero_juggernaut" "1"
      "npc_dota_hero_kunkka" "1"
      "npc_dota_hero_leshrac" "1"
      "npc_dota_hero_lich" "1"
      "npc_dota_hero_life_stealer" "1"
      "npc_dota_hero_lina" "1"
      "npc_dota_hero_lion" "1"
      "npc_dota_hero_mirana" "1"
      "npc_dota_hero_morphling" "1"
      "npc_dota_hero_necrolyte" "1"
      "npc_dota_hero_nevermore" "1"
      "npc_dota_hero_night_stalker" "1"
      "npc_dota_hero_omniknight" "1"
      "npc_dota_hero_puck" "1"
      "npc_dota_hero_pudge" "1"
      "npc_dota_hero_pugna" "1"
      "npc_dota_hero_rattletrap" "1"
      "npc_dota_hero_razor" "1"
      "npc_dota_hero_riki" "1"
      "npc_dota_hero_sand_king" "1"
      "npc_dota_hero_shadow_shaman" "1"
      "npc_dota_hero_slardar" "1"
      "npc_dota_hero_sniper" "1"
      "npc_dota_hero_spectre" "1"
      "npc_dota_hero_storm_spirit" "1"
      "npc_dota_hero_sven" "1"
      "npc_dota_hero_tidehunter" "1"
      "npc_dota_hero_tinker" "1"
      "npc_dota_hero_tiny" "1"
      "npc_dota_hero_vengefulspirit" "1"
      "npc_dota_hero_venomancer"  "1"
      "npc_dota_hero_viper" "1"
      "npc_dota_hero_weaver" "1"
      "npc_dota_hero_windrunner" "1"
      "npc_dota_hero_witch_doctor" "1"
      "npc_dota_hero_zuus" "1"
      "npc_dota_hero_broodmother" "1"
      "npc_dota_hero_skeleton_king" "1"
      "npc_dota_hero_queenofpain" "1"
      "npc_dota_hero_huskar" "1"
      "npc_dota_hero_jakiro" "1"
      "npc_dota_hero_batrider" "1"
      "npc_dota_hero_warlock" "1"
      "npc_dota_hero_alchemist" "1"
      "npc_dota_hero_death_prophet" "1"
      "npc_dota_hero_ursa" "1"
      "npc_dota_hero_bounty_hunter" "1"
      "npc_dota_hero_silencer" "1"
      "npc_dota_hero_spirit_breaker" "1"
      "npc_dota_hero_invoker" "1"
      "npc_dota_hero_clinkz" "1"
      "npc_dota_hero_obsidian_destroyer" "1"
      "npc_dota_hero_shadow_demon" "1"
      "npc_dota_hero_lycan" "1"
      "npc_dota_hero_lone_druid" "1"
      "npc_dota_hero_brewmaster" "1"
      "npc_dota_hero_phantom_lancer" "1"
      "npc_dota_hero_treant" "1"
      "npc_dota_hero_ogre_magi" "1"
      "npc_dota_hero_chaos_knight" "1"
      "npc_dota_hero_phantom_assassin" "1"
      "npc_dota_hero_gyrocopter" "1"
      "npc_dota_hero_rubick" "1"
      "npc_dota_hero_luna" "1"
      "npc_dota_hero_wisp" "1"
      "npc_dota_hero_disruptor" "1"
      "npc_dota_hero_undying" "1"
      "npc_dota_hero_templar_assassin" "1"
      "npc_dota_hero_naga_siren" "1"
      "npc_dota_hero_nyx_assassin" "1"
      "npc_dota_hero_keeper_of_the_light" "1"
      "npc_dota_hero_visage" "1"
      "npc_dota_hero_meepo" "1"
      "npc_dota_hero_magnataur" "1"
      "npc_dota_hero_centaur" "1"
      "npc_dota_hero_slark" "1"
      "npc_dota_hero_shredder" "1"
      "npc_dota_hero_medusa" "1"
      "npc_dota_hero_troll_warlord" "1"
      "npc_dota_hero_tusk" "1"
      "npc_dota_hero_bristleback" "1"
      "npc_dota_hero_skywrath_mage" "1"
      "npc_dota_hero_elder_titan" "1"
      "npc_dota_hero_abaddon" "1"
      "npc_dota_hero_earth_spirit" "1"
      "npc_dota_hero_ember_spirit" "1"
      "npc_dota_hero_legion_commander" "1"
      "npc_dota_hero_phoenix" "1"
      "npc_dota_hero_terrorblade" "1"
    }
    
  • Posts: 15

    Thanks Idle

  • Posts: 2

    how is it possible that team1 can pick heros which banned at team2 and vice versa ?

  • Posts: 15

    Im not sure but that is interesting tho. Maybe start a new discussion?

  • AshAsh
    Posts: 14

    how is it possible that team1 can pick heros which banned at team2 and vice versa ?

    https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/API/CDOTAGamerules.SetSameHeroSelectionEnabled

    That should help you achieve what you're looking to do.