Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14

Thread: How do I load and test my new bot?

  1. #11
    Basic Member
    Join Date
    Jul 2014
    Posts
    22
    Quote Originally Posted by ChrisC View Post
    This should be fixed with the main release today.
    The hero_selection.lua script is working for me now, both in the test client and the main client, thanks.

  2. #12
    Basic Member
    Join Date
    Jul 2014
    Posts
    22
    Quote Originally Posted by trevorflux2 View Post
    I assumed that copying game/dota/scripts/vscripts/bots_example into a new folder in there and changing things would be enough to have my own bots, but in the Bot Selection dropdown I still only see the "default" option.

    Is there any basic documentation regarding getting a basic bot up and running? I tried to find some bot definitions file or some config section, but no luck.
    When you wrote this post you were probably using the main client, but bot scripting was not available in the main client until today. If you try it in the main client now it should work.

    If I understood it correctly, the scripts in the bots_example folder are not a complete bot, they are just basic examples of how bot scripting works.

    The hero_selection.lua script, for example, is only selecting 10 heroes at the start of a bot game. A more advanced script would probably select heroes based on what the other team is picking, and maybe check that any heroes are not picked twice, or something like that.

    To run any of the bot scripts you need to place them all in the in the same location:

    Windows:
    C:\Program Files (x86)\Steam\SteamApps\common\dota 2 beta\game\dota\scripts\vscripts\bots

    Linux:
    ~/.steam/steam/steamapps/common/dota 2 beta/game/dota/scripts/vscripts/bots

    The bots folder does not exist, so you need to create it.

    When you start a bot game and select "LOCAL DEV SCRIPT" in the bot settings, the files from this folder will be loaded. If you created a script called hero_selection.lua there, it will automatically be loaded and run during the hero selection of your bot game.

    Short instructions for running the hero_selection.lua example script:

    1. Create the bots folder if it doesn't exist:

    dota 2 beta\game\dota\scripts\vscripts\bots

    2. Copy the hero_selection.lua file from the bots_example folder to the bots folder.

    3. Start Dota 2 and create a local lobby with these settings:

    Server location: local host
    Fill empty slots with bots: yes
    Radiant difficulty: anything except none
    Radiant bots: local dev script
    Dire difficulty: anything except none
    Dire bots: local dev script

    4. If there are no errors in the script it will load when the game starts and select all 10 heroes. If you changed nothing in the script you will probably be playing Anti-mage. You can read anything the script prints out in the game console.

  3. #13
    Basic Member
    Join Date
    Dec 2016
    Posts
    1
    Tangoed thanks for that, it took me a while to figure out all those things this morning. That should help anyone else immensely.

    I wonder though is there anyway to run a game without playing in it? Like rather just spectate a team? I'm assuming that is something that will happen though?

  4. #14
    Not yet, but it should be on the roadmap. ChrisC said we should all be able to do that, but since we can't it should be fixed sometime soon.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •