Dota 2
BOT EXPERIMENT Credit:FURIOUSPUPPY
Vile RoBot Mar 21, 2020 @ 4:14pm
How do I watch the bots I choose to face off against?
Is there some mode, command or script file that I can edit to choose the 5 heroes of each team and then watch the game in spectator mode?

Before there was function think () and lines with the names of each hero to edit. Now I don't know how it is working or if it is still possible. If it is possible and someone can teach me, I am available! :steamhappy:

< >
Showing 1-15 of 17 comments
52Hz Mar 22, 2020 @ 3:30am 
+good Q
Seth Apr 6, 2020 @ 12:54pm 
+1 :d2rubick:
Stu Apr 16, 2020 @ 3:23pm 
+2
gun Jul 22, 2020 @ 4:12pm 
So the way i do it is by editing hero_selection.lua in steam\steamapps\workshop\content\570\837040016 folder.

You have to do is edit "function XYZModeLogic()" function where XYZ is the mode you wanna spectate, for example Turbo mode is "function NewTurboModeLogic()", All Pick is "function AllPickLogic()".

If you are able to find those functions in hero_selection.lua you can edit them to tell bots heroes you want. They do it without waiting for bans or their turns so i guess its not very immersive.

Now the way i edit is as follows:

1. Delete all content of the function of a mode you wanna play, for me its turbo so i delete everything between the lines of

---
function NewTurboModeLogic()

end
---

now it has to be the right end but if you're using notepad++ or something like that it should help you with that.

2. Copy and paste following lines between the ones you left

---
local teamA = team1;
local teamB = team2;

if GameTime() >= 5 then
SelectHero(2, teamA[1]);
SelectHero(3, teamA[2]);
SelectHero(4, teamA[3]);
SelectHero(5, teamA[4]);
SelectHero(6, teamA[5]);
SelectHero(7, teamB[1]);
SelectHero(8, teamB[2]);
SelectHero(9, teamB[3]);
SelectHero(10, teamB[4]);
SelectHero(11, teamB[5]);
return;
end
---

so it's inside the chosen function.

3. Above the function line (in this example above "function NewTurboModeLogic()" line put following lines:

---
local team1 = {
'npc_dota_hero_leshrac',
'npc_dota_hero_nevermore',
'npc_dota_hero_lich',
'npc_dota_hero_shredder',
'npc_dota_hero_crystal_maiden'
};

local team2 = {
'npc_dota_hero_sniper',
'npc_dota_hero_morphling',
'npc_dota_hero_undying',
'npc_dota_hero_bristleback',
'npc_dota_hero_snapfire'
};
---

you can change the names after the 'npc_dota_hero_' for your own heroes just remember that sometimes heroes have different names than in game.

Radiant is team1 and Dire is team2 and lanes are as follows:

Mid
Top
Top
Bot
Bot



Some advice for spectating.

-use sv_cheats 1 in console and after use host_timescale 2 for speeding up the game, you can use and number instead of 2 even in intro screens.
-save the unedited hero_selection.lua somewhere other as a backup in case you wanna play with bots yourself
-save the edited version of hero_selection.lua as it will get restored to default when the bot team updates it

Good luck and have fun.
Vile RoBot Jul 29, 2020 @ 5:45pm 
Originally posted by gun:
So the way i do it is by editing hero_selection.lua in steam\steamapps\workshop\content\570\837040016 folder.

You have to do is edit "function XYZModeLogic()" function where XYZ is the mode you wanna spectate, for example Turbo mode is "function NewTurboModeLogic()", All Pick is "function AllPickLogic()".

If you are able to find those functions in hero_selection.lua you can edit them to tell bots heroes you want. They do it without waiting for bans or their turns so i guess its not very immersive.

Now the way i edit is as follows:

1. Delete all content of the function of a mode you wanna play, for me its turbo so i delete everything between the lines of

---
function NewTurboModeLogic()

end
---

now it has to be the right end but if you're using notepad++ or something like that it should help you with that.

2. Copy and paste following lines between the ones you left

---
local teamA = team1;
local teamB = team2;

if GameTime() >= 5 then
SelectHero(2, teamA[1]);
SelectHero(3, teamA[2]);
SelectHero(4, teamA[3]);
SelectHero(5, teamA[4]);
SelectHero(6, teamA[5]);
SelectHero(7, teamB[1]);
SelectHero(8, teamB[2]);
SelectHero(9, teamB[3]);
SelectHero(10, teamB[4]);
SelectHero(11, teamB[5]);
return;
end
---

so it's inside the chosen function.

3. Above the function line (in this example above "function NewTurboModeLogic()" line put following lines:

---
local team1 = {
'npc_dota_hero_leshrac',
'npc_dota_hero_nevermore',
'npc_dota_hero_lich',
'npc_dota_hero_shredder',
'npc_dota_hero_crystal_maiden'
};

local team2 = {
'npc_dota_hero_sniper',
'npc_dota_hero_morphling',
'npc_dota_hero_undying',
'npc_dota_hero_bristleback',
'npc_dota_hero_snapfire'
};
---

you can change the names after the 'npc_dota_hero_' for your own heroes just remember that sometimes heroes have different names than in game.

Radiant is team1 and Dire is team2 and lanes are as follows:

Mid
Top
Top
Bot
Bot



Some advice for spectating.

-use sv_cheats 1 in console and after use host_timescale 2 for speeding up the game, you can use and number instead of 2 even in intro screens.
-save the unedited hero_selection.lua somewhere other as a backup in case you wanna play with bots yourself
-save the edited version of hero_selection.lua as it will get restored to default when the bot team updates it

Good luck and have fun.

Hello, gun! First of all: thx for help!

I'm going to need your help a little more because I'm doing something wrong. I edited it as I understood your explanation (I probably did something wrong), but it didn't work. when I put the turbo mode, the bots lose the personalized names that this script has (the names of the team professionals) and only choose the default heroes of the Valve bots.

Can you help me a little more? If you prefer, I post here how it was the edition I made in the hero_selection.lua file.

gun Jul 30, 2020 @ 6:56am 
https://drive.google.com/file/d/1EBTTE04vWiEWxknXLKOicLYlFLEO9r0W/view?usp=sharing

That's mine hero_selection.lua, I think this way it's easier. Just copy it to steam\steamapps\workshop\content\570\837040016 folder and replace the exiting one.

You can change the bots by changing local team1 and local team2 variables inside the file. Just before you start changing that make sure the file works with my edits. Bots should pick Shadow Fiend, Kunkka, Lich, Timbersaw, CM, Sniper, Tiny, Undying, Bristleback and Snapfire.

When you select Turbo i have it on local host, i join the brodcast channel, both teams have the BOT EXPERIMENT selected.

Let me know if it still doesn't work or you have any other questions.
Last edited by gun; Jul 30, 2020 @ 7:02am
Benimon Jul 30, 2020 @ 9:17am 
is this only possible on local host ?
gun Jul 30, 2020 @ 9:42am 
As far as i know. Never tried it any other way tho so can't say for sure.
Vile RoBot Jul 30, 2020 @ 11:09am 
Originally posted by gun:
https://drive.google.com/file/d/1EBTTE04vWiEWxknXLKOicLYlFLEO9r0W/view?usp=sharing

That's mine hero_selection.lua, I think this way it's easier. Just copy it to steam\steamapps\workshop\content\570\837040016 folder and replace the exiting one.

You can change the bots by changing local team1 and local team2 variables inside the file. Just before you start changing that make sure the file works with my edits. Bots should pick Shadow Fiend, Kunkka, Lich, Timbersaw, CM, Sniper, Tiny, Undying, Bristleback and Snapfire.

When you select Turbo i have it on local host, i join the brodcast channel, both teams have the BOT EXPERIMENT selected.

Let me know if it still doesn't work or you have any other questions.

man, you're angel! :steamhappy:
ty so much!

I had put a part of the code wrong and I also didn't put the last line "end" because I thought the last one would be enough.

you saved my future bot tournament \õ/
Vile RoBot Jul 30, 2020 @ 11:10am 
Originally posted by Benimon:
is this only possible on local host ?

I think that it is not possible because we do not have any access to the files of the valve's regional servers.
gun Jul 30, 2020 @ 11:26am 
I'm happy i was able to help.

Btw you can create more team variables like local team3, local team4 and so on and keep the lineups inside them. This way all you have to do is change the number in the
local teamA = team1;
local teamB = team2;
lines to the teams you wanna use. Saves a lot of time.

Have fun with your tournament :D
Vile RoBot Aug 3, 2020 @ 11:17am 
Originally posted by gun:
I'm happy i was able to help.

Btw you can create more team variables like local team3, local team4 and so on and keep the lineups inside them. This way all you have to do is change the number in the
local teamA = team1;
local teamB = team2;
lines to the teams you wanna use. Saves a lot of time.

Have fun with your tournament :D

that's a good idea too! thx, man! sz
Vile RoBot Sep 14, 2020 @ 10:00am 
@gun man, sorry for brothering you again, but do you know how I can modify heroes' evasion and spell amplification statuses through the "npc_heroes.txt" file?

The armor one, for example, changes on the line "ArmorPhysical".

I found how to modify any type of hero stats except for evasion, spell amp. and status resistance.
GGelson Dec 17, 2020 @ 6:49pm 
Originally posted by Shame Bot:
@gun man, sorry for brothering you again, but do you know how I can modify heroes' evasion and spell amplification statuses through the "npc_heroes.txt" file?

The armor one, for example, changes on the line "ArmorPhysical".

I found how to modify any type of hero stats except for evasion, spell amp. and status resistance.
Hey bro, thx for the help, i followed your tutorials and managed to create my personal all pick as well, but, all bots come with default skin. Is there a way to make the bots use my skins ?
gun Dec 17, 2020 @ 6:55pm 
I have no idea and can't check because i don't own any skins myself. Sorry.
< >
Showing 1-15 of 17 comments
Per page: 1530 50