Intro tutorial to the Dota 2 5v5 Framework

Create your bot in a single python file inside the “bots” folder. You can copy/paste the code in, an empty sample bot that you can use as a template.

The following example shows MyFirstBot, coded in the file, and it includes the sample code. Notice that you select your heroes inside the constructor.

The bots folder also includes, a sample working bot that contains a lot of useful sample code to create a basic bot. The very basics:

The class Hero , included in the framework, contains many convenient methods to retrieve data regarding any hero in the game.

Notice that PlayerHero inherits from Hero, which inherits from BaseNPC, which inherits from BaseEntity. BaseEntity and BaseNPC also have general convenient methods applicable to all game entities and NPCs, respectively. Check them in the source code!

World contains many convenient methods to retrieve information regarding important elements in the gamestate.