forest0xia / dota2bot-OpenHyperAI

A beta Dota2 Bot Script aims to provide better bot game experience
https://steamcommunity.com/sharedfiles/filedetails/?id=3246316298
MIT License
50 stars 9 forks source link
dota2 dota2-bot

We love bot games!

We love bot games! There is currently a Valve side bug, [CRITICAL] in order to play the script you need to create a Lobby and select "Local Host" as Server Location. To enable enhanced challenging mode, follow the steps on Workshop page to correctly install this script. The bots in game should have names with suffix ".OHA" when installed correctly.

Bot script in Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=3246316298

Script introduction in other languages:

  1. 中文介绍
  2. Введение на русском
  3. Introducción en español
  4. Introdução em português
  5. If you still have language problems, copy the content and paste to https://chatgpt.com/ or other tools to translate words to your language.

Thanks and kudos to all that contributed to make bot games fun and exciting.

The goal of this script is to:

  1. Share the most up to date functionalities that we've implemented/fixed to keep the bot games challenging,
  2. For players to have fun with chill by playing/practicing against the bots that can play ALL Dota2 heroes.
  3. Bots are meant to be for chill games, if you are looking for more competitive bots than the existing ones, please stop complaining and help us build it with constructive effort.

Why it's enjoyable

  1. Support 7.37
  2. Support ALL 125 heroes! You will see bots playing Ringmaster, Invoker, Techies, Meepo, Lone Druid, Dark Willow, Hoodwink, io, Muerta, Primal Beast, etc. Just note that some of the newly added ones are not very strong and in progress to be further enhanced.
  3. Bots are customizable . E.g. you can easily set ban / picks for bots, change their names, etc. Check out the file in bots/Customize/general.lua, or in local Workshop directory: <steam folder>\steamapps\workshop\content\570\3246316298\Customize\general.lua
  4. Dynamic difficulty. If you ever feel all existing bot scripts lack excitement. This script boosts bots with huge unfair advantages to make bot games a lot more challenging. You will need to copy the script into your local vscripts folder and then enable the Fretbots mode for this feature. See instructions below.
  5. Support almost ALL game modes: https://steamcommunity.com/workshop/filedetails/discussion/3246316298/4334231305373971730/
  6. Improved code structure & general logic for decision making for ability casting, item usages, defending, roaming as well as farming.
  7. Enhanced AI Chatbot. You can chat with bots in the game as if they were real and optimistic players. Integrated with ChatGPT. [Note: you need to enable Fretbot mode for this, check out How to Install section below.]
  8. All supported heroes in this script can play any position roles. Heroes will go to any lane they are assigned. The laning or pos of the bot heroes will seem random in the game, but it's deterministic - check the Bot roles section below.
  9. Fixed tons of bugs. Bugs that can cause bots to stay idle or cancel it's own channeling spells or stuck on weird states.

How to install this script?

  1. There is currently a bug on Valve side that new bot scripts can only work in Custom Lobby with "Local Host" as the Server Location.
  2. This script can boost bots with huge unfair advantage that make the game much harder. You must manually install this script, please follow the instruction here: https://steamcommunity.com/workshop/filedetails/discussion/3246316298/4764334012741504141/

Bot roles, lanings and positioning

  1. In local lobby, the positions of the bots are the same as the order of the slots: 1, 2, 3, 4, 5 from top to bottom in the lobby.
  2. Support multiple in-game commands:
    1. !pos X You can type: !pos X to swap the position with a bot. For example: !pos 2 to swap role and lane with the bot that's going to mid.
    2. !pick XXX During hero selection phase, you can type: !pick XXX to pick a hero. For example: !pick puck to pick puck as ally.
      1. You can type: /all !pick XXX to pick hero for enemy. For example: /all !pick puck to pick puck as enemy.
      2. For complex hero names or names that may apply to multiple heroes, please use the full internal code name. For example: !pick npc_dota_hero_keeper_of_the_light .
      3. You can find a list of hero's internal code names in here: https://steamcommunity.com/workshop/filedetails/discussion/3246316298/4848777260032086340/
    3. !ban XXX You can type: !ban XXX to ban a hero so the bots won't pick that hero. For example: !ban puck to prevent any bots from picking puck.
  3. You can change bot ban/picks, and roles, etc easily and permanently. Check out the file in bots/Customize/general.lua
  4. Pos1 and Pos5 bots go to safe lane. Pos3 and Pos4 bots go offlane. Pos2 bot goes to mid lane.

If you want to contribute to this script

  1. Please feel very welcome to contribute to the Github repo any time you like. Just update the logic and create a pull request.
  2. Future development work for this script will be written in typescript as possible: typescript/README.
  3. The typescipt source code is as well work-in-progress, feel free to convert more lua files to ts, and add libs/modules as you feel necessary.

What's next

  1. Ultimately, the bots play style is static/fixed with the current AI approach provided by Valve at the moment. We need machine learning AI bots! Just like the AIs we’ve seen from OpenAI Five.
  2. Follow up on https://www.reddit.com/r/DotA2/comments/1ezxpav/a_note_to_valve_official_regarding_bot_scripts/
  3. Maybe traning machine learning AI.
  4. Better decision making on laning, pushing and ganking.
  5. Better spell casting for certain heroes like Invoker, Rubick, etc.
  6. Support all game modes.
  7. More code bug fixes.
  8. Figure out how to better support the Bugged-Heroes: Dark Willow, Elder Titan, Hoodwink, io, Lone Druid, Marci, Muerta, Primal Beast. Note that they are buggy due to problems on the Valves side, not script developers.

Support the script

  1. Please feel very welcome to contribute to the Github repo.
  2. If you'd like to buy me a coffee: https://steamcommunity.com/workshop/filedetails/discussion/3246316298/6553383644012991605/

Useful resources:

Credits to

This script is based on Valve's default bot script and many other people's work and their scripts. That being said, this is a partial override not completely take over bot script. It takes the advantages of some other existing bot scripts and aims to be a better off script than the existing ones. We hope the bot's decision making and team strategies are more effective and brings more joy to you.

Things to be updated: