Jump to content

AI Playerbot


Unkle Nuke

Recommended Posts

This thread is continuation of the old Playerbot-AI topic http://getmangos.eu/community/viewtopic.php?id=15924

GitHub branch: https://github.com/ike3/mangos

Documentation: ike3/mangos @ GitHub

Compile and Installation:

==================

1) You need an English game client (i18n is not supported yet).

1a) Extract DBC files from the client

2) Clone git repository and build it using the same approach as original MaNGOS (no custom build steps are required). Make sure you have the latest version.

2a) Optional: Setup MMaps.

2b) Optional: Setup Armory.

2c) Optional: Setup AhBot.

3) Create configuration file aiplayerbot.conf in the mangos config directory (where your mangosd.conf takes place)

4) Type AiPlayerbot.enabled=1 in the aiplayerbot.conf file.

5) If you want to add bots from your guild, not only your account, add AiPlayerbot.AllowGuildBots=1 to the aiplayerbot.conf. You can even

allow everybody to add bots from the accounts by their IDs: AiPlayerbot.RandomBotAccounts=11,12

6) Run the server, make sure it says AI Playerbot is enabled.

Summoning A Bot:

==============

1) Login with the character you will play.

2) To summon a bot use one of these chat commands.

2a) /.bot add $CHARACTER_NAME

2b) /.bot add $ACCOUNT_NAME

Make sure your bot is nearby, as the AI won't allow players to summon bots any other way but using a meeting stone! If everything is ok, the new bot will whisper your character with "Hello".

Link to comment
Share on other sites

  • 42 years later...

Okay, not sure if I should be raising this here or head over to playerbot.mine.nu and hit you guys up there about playing with the new-ai branch of Playerbot. I've compiled a development realm to test various things that are coming through both Mangos and Playerbot and have recompiled it a few times now, updated the databases to suit and so on and thought I'd have a go at the new-ai branch of Playerbot. When I compiled it and ran it the Mangos server whined as follows:

SQL: SELECT required_5_playerbotai_auto_follow FROM playerbotai_db_version LIMIT 1
query ERROR: Unknown column 'required_5_playerbotai_auto_follow' in 'field list'
The table `playerbotai_db_version` in your [CHARACTER] database indicates that this database is out of date!

 [A] You have: --> `1_playerbotai_talentspecs.sql`

 [b] You need: --> `5_playerbotai_auto_follow.sql`

You must apply all updates after [A] to [b] to use mangos with this database.
These updates are included in the sql/updates folder.
Please read the included [README] in sql/updates for instructions on updating.

Now it seems I can't find the sql updates that are referenced either in the Magos sql/updates nor in any of the portal/playerbot repositories. I've even attempted to google the specified references without success. Where do I get these updates for the Character database?

It's cool if I have to go back to the relative safety of playerbot/mangos but I've been drooling over all these new AI Features growing in these blueboy/portal new_ai bots and really wanted to try them out....

:(

Link to comment
Share on other sites

Uh... hate to tell you this, bugeyed, since you made such a detailed post.

Ike's Playerbot AI repo is an entirely separate project. It has no affiliation at all with blueboy's Playerbot or the new-ai branch of the portal development repo for Playerbot.

It does cause a lot of confusion. Perhaps renaming Playerbot AI to Battlebot AI, or some other variation on the theme, would help. That's up to this project's leads.

The original goal of Playerbot AI was to make it possible to populate battlegrounds and arenas with independent bots, allowing low-pop servers to engage in large-scale PvP. Unfortunately, the code-base is not compatible with blueboy's due to Ike's using a port from another core of a similar player bot project for his starting point.

Link to comment
Share on other sites

Uh... hate to tell you this, bugeyed, since you made such a detailed post.

Ike's Playerbot AI repo is an entirely separate project. It has no affiliation at all with blueboy's Playerbot or the new-ai branch of the portal development repo for Playerbot.

It does cause a lot of confusion. Perhaps renaming Playerbot AI to Battlebot AI, or some other variation on the theme, would help. That's up to this project's leads.

The original goal of Playerbot AI was to make it possible to populate battlegrounds and arenas with independent bots, allowing low-pop servers to engage in large-scale PvP. Unfortunately, the code-base is not compatible with blueboy's due to Ike's using a port from another core of a similar player bot project for his starting point.

Haha! Oh, bugger.... so it is. Sorry Ike, blaming you for something you didn't do... :P

Link to comment
Share on other sites

  • 2 weeks later...

Hey guys,

I'm really new to the whole private server thing and recently downloaded a repack for Burning Crusade 2.4.3, which has playerbots. I'm not sure if it's using a playerbot script for a later version of WoW or an old and outdated script or even if that's as far developed playerbots are, but, I've noticed many classes only work with 1 talent spec (Priest will only be useful with a full holy spec etc) unless they're dueling where they will then cast offensive spells? I've also noticed bots repeatedly use whatever drinks they have until they run out rather than actually drinking.

So my question is am I using an old/or updated passed BC playerbot script?

or is this as far as it's been developed? If there is any BC specific playerbot scripts or more updated, how hard is it to compile my own core/repack thing with it and where do I get instance scripts and shit to do it?

Appreciate any answers, my friends are loving the bots though. It can be almost as irritating as real WoW!

-Nooblord

Link to comment
Share on other sites

Unfortunately there is no specific branch for BC or Mangos Zero, only WoTLK (3.3.5a) is currently supported,

Regarding to talent specs, the bot on login determines which talent spec he has and switches to this strategy, so if a mage has 40 points in frost and less points in fire and arcane it won't use fire and arcane spells as they probably are not so efficient.

Anyway the bot master can change his bot behaviour in any time whispering to him:

/w botname co +strategy1,+strategy2,-strategy3,....

E.g. if you whisper

/w botname co +fire

the mage bot will switch to fire spells (which is dictated by fire strategy). The intention to do this is making bot support each other in party. So, if you have 3 druids in party (restoration, bear and balance) the bot ai should know this and bear will use threat-generating abilities, balance - dps and restoration will be healer). You can always change their roles though.

You can whisper any invalid command and if bot do not understand what to do it will reply with a little help, such as:

Unknown command: jkfjhgfg

Whisper any of: ...

Possible strategies are: fire, frost, arcane,....

Please feel free to command him to use any other strategy. Unfortunately is is not possible to specify custom

Link to comment
Share on other sites

In the original this projects was used just to enhance a single private server (having a lot of beginner players) so they could level and do some dungeons and raids even if no other is online for training purposes. As they had some positive feedback the code is become shared and development continued. So if somebody finds this useful please feel free to fork, create a patch or anything else as this is exactly what is open-source is for.

The name "Playerbot AI" is just because this was the fork of "Playerbot" some years ago, but now it is almost completely rewritten and is not compatible with blueboy's branch (unfortunately the compatibility was lost in architecture: Ai Playerbot is object-oriented while blueboy one is functional-oriented).

From player's point of view, the main difference from blueboy's playerbot is that this one is PvE-oriented, as blueboy's one is PvP-oriented.

Link to comment
Share on other sites

Thanks for the reply, kuzminsv

I think my repack my be using one of blueboy's AI because I tried that command and it didn't do anything. How well do the WotLK playerbots work with TBC? I'm guessing they just skip a few abilities or something. What is the best playerbot for PvE?

Link to comment
Share on other sites

  • 3 weeks later...

Hello there.

I see a lot of people wants to try ai playerbot with mangos different versions. Unfortunately I have very little time I can spare on playerbot so maintaining multiple branches could be an issue.

Ai Playerbot has very little modifications in the core (almost all logic is concentrated in playerbot directory). So in case if someone desides to try a simple merge my suggestion would be to make a diff between ai branch and mangos/master then apply this patch to the new codebase. If the API is similar to mangos/master there would be no big deal to make it compile.

Link to comment
Share on other sites

It may be a long time before I can clear some other work, but I will try to do a simple merge of Playerbot-AI with MaNGOS for classic WoW and Burning Crusade.

After that is done, perhaps this will allow others to create proper backports.

II would also clarify that blueboy's Playerbots are intended to work as a party with the player. This allows players to complete quests and dungeons requiring multiple players, up to 9 bots.

It was my understanding that Playerbot-AI was created mainly for battlegrounds and arenas. Has the function of the bots been expanded to work also as players for quests and dungeons?

Link to comment
Share on other sites

Playerbot AI is purely PVE, it is designed for leveling, performing quests, visiting dungeons and raids with bots so the master player MUST be in a party. Although bot AI is powerful enough to take out many high heroic dungeon bosses (In fact, a proper equipped party of one skilled player and 4 bots can go through a 5-man heroic dungeon with no single death making WoW a single-player game), bots still require master's control, he should tell them where to go, when to attack or so.

PVP is something very new to AI Playerbot. It is under development at the moment and unexpected things can happen. There is no plans for battlegrounds and arenas other that players can bring some bots with them. I think bot will never be enough to take out a skilled player in pvp :(

The main goal of this project is educational: an object-oriented approach to AI development (maybe including machine learning and neuron nets in future). The project goals are the same as Blueboy's playerbot has and I'll be happy to contribute my code but due to architectural reasons I see no way to merge there at the moment.

Link to comment
Share on other sites

I have wished the two projects could work together. So much more could be accomplished. Unfortunately, Playerbot and Playerbot AI have become very set in their methods. Merging the best parts of both would likely require an entirely new project started from scratch.

If such a thing ever happens or does not, Playerbot AI is still a remarkable work and I am sure we will see greater things to come for it.

Keep up the good work! :D

Link to comment
Share on other sites

  • 2 weeks later...

Please note that the branch name has been changed on GitHub from ai to

  • mangos-wotlk-ai - for 3.3.5a client
  • mangos-one-ai - for 2.4.3 client
  • mangos-zero-ai - for 1.12 client

mangos-wotlk-ai is the main replacement branch of ai branch. Although basic Ai Playerbot features work for other mangos versions these branches are still experimental.

Link to comment
Share on other sites

  • 3 weeks later...

Yeah, its cool. I have the bot for Mangos one.

Is there a way to change the msg the bot says to someone else besides the master who whispers to it?

It just says something like you need to contact my master so and so.

Maybe make it say, I'm busy or something? Is that possible? Or that written in the code somewhere and not editable?

Link to comment
Share on other sites

It is very easy. Just change the text at PlayerbotAI:202 to any message you want.

   if (fromPlayer.GetObjectGuid() != GetMaster()->GetObjectGuid())
   {
       WorldPacket data(SMSG_MESSAGECHAT, 1024);
       bot->BuildPlayerChat(&data, CHAT_MSG_WHISPER, "I speak to my master only", LANG_UNIVERSAL);
       GetMaster()->GetSession()->SendPacket(&data);
       return;
   }

Link to comment
Share on other sites

when I try to add a random bot into the game it always say "botname - now allowed" and do nothing

I can invite my other characters but can't invite random bots

I configured the random bot accounts (6,7,8,9) and the server generate some random characters but .bot add accountname or charactername was not works and the ai_playerbot_random_bots table is empty

mangosr2-ai branch

Link to comment
Share on other sites

Random bot feature is experimental, but it is working fine for me. Please set AiPlayerbot.RandomBotAutologin = 1 in aiplayerbot.conf (I'l make it default choice in future commits).

If AiPlayerbot.RandomBotAutologin = 1 each player brings with him some bots online (the system chooses randomly a subset of characters available in random account list). They became randomized in race, class, level, equipment, talents, etc. and teleported to a random place in the wolrd where they start grinding (attack anything they see). Non-friendly bots will even ambush the master sometimes starting accident pvp attacks. The player can open "who" window and choose some bots iniviting them to the group, then teleport using a meeting stone or 'summon' command at the inn or city. The bots will ignore any command from player until invited to a group. The subset will be changed after some time (a week by default).

A regular player is allowed to control only the subset of random bots the system gave to him (they also should be no more that +5 levels). Although GM can add/remove any bot from random account list but they will listen to him only. This is a limitation as bots share master's session so they can spy his packets.

This can be configured by settings config parameters such as:

    randomBotAutologin = config.GetBoolDefault("AiPlayerbot.RandomBotAutologin", false);
   minRandomBots = config.GetIntDefault("AiPlayerbot.MinRandomBots", 1);
   maxRandomBots = config.GetIntDefault("AiPlayerbot.MaxRandomBots", 10);
   randomBotUpdateInterval = config.GetIntDefault("AiPlayerbot.RandomBotUpdateInterval", 60);
   randomBotCountChangeInterval = config.GetIntDefault("AiPlayerbot.RandomBotCountChangeInterval", 5 * 24 * 3600);
   minRandomBotInWorldTime = config.GetIntDefault("AiPlayerbot.MinRandomBotInWorldTime", 2 * 3600);
   maxRandomBotInWorldTime = config.GetIntDefault("AiPlayerbot.MaxRandomBotInWorldTime", 14 * 24 * 3600);
   minRandomBotRandomizeTime = config.GetIntDefault("AiPlayerbot.MinRandomBotRandomizeTime", 2 * 3600);
   maxRandomRandomizeTime = config.GetIntDefault("AiPlayerbot.MaxRandomRandomizeTime", 14 * 24 * 3600);
   minRandomBotPvpTime = config.GetIntDefault("AiPlayerbot.MinRandomBotPvpTime", 120);
   maxRandomBotPvpTime = config.GetIntDefault("AiPlayerbot.MaxRandomBotPvpTime", 3 * 3600);
   randomBotTeleportDistance = config.GetIntDefault("AiPlayerbot.RandomBotTeleportDistance", 400);
   minRandomBotsPerInterval = config.GetIntDefault("AiPlayerbot.MinRandomBotsPerInterval", 1);
   maxRandomBotsPerInterval = config.GetIntDefault("AiPlayerbot.MaxRandomBotsPerInterval", 5);
   randomBotEnemyPercent = config.GetIntDefault("AiPlayerbot.RandomBotEnemyPercent", 30);

The idea is that the player uses a dungeon finder and random bots join player's group. This is not implemented yet :( The only way is to open 'who' window and try to speak with adequate level players hoping they answer "please invite me to your group first". Then player can go to a meeting stone or an inn and summon them.

Link to comment
Share on other sites

Using

Commit hash: 5fd1694c91cf245b338925a176f161b1f876fecb

[ai-1] fix for "random bots have too many totems", AiPlayerbot.RandomBotQuestItems parameter to specify which quest rewards bot must not destroy

and I have two issues:

1: Mage bots will not follow master

2: Talking to mount vendors (any) crashes game. I built in debug to get a good crash log, but no crashes in debug build, rebuilt release but still crashes..

Link to comment
Share on other sites

Just fixed mage issue in [ai-7] GenericMageNonCombatStrategy inheritance fix (preventing mage bot following master) in mangosr2-wotlk-ai branch.

Cannot reproduce mount vendor issue (tried Orgrimmar and Stormwind ones with mangosr2-wotlk-ai branch). Are you sure there is no crash log. Can you try to debug the server in visual studio or gdb? It will stop at crash point.

Link to comment
Share on other sites

  • 2 months later...

I'm really excited to try out this branch, it sounds like a really interesting project!

However, trying to compile it, I came across several issues, not sure how to resolve them...

I successfully checked out the git repository for ike3's playerbot AI branch and compiled it using Visual Studio 2010 Express (on Windows). This part ran smoothly and did not give any errors.

Now, the Scriptdev2 part is giving me a whole lot of trouble... I tried getting the repository from git://github.com/scriptdev2/scriptdev2, but compiling it didn't work (I put it into the proper directory under "src/bindings/ScriptDev2" beforehand) - the compilation resulted in multiple "identifier not found" errors, e.g. for TEMPFACTION_TOGGLE_OOC_NOT_ATTACK, TEMPFACTION_TOGGLE_PASSIVE and the like.

Thinking that maybe I'm checking out the wrong repository, I tried the one from git://github.com/mangosR2/scriptdev2, but couldn't find compilation files for Windows. Tried to do the CMake magic but the project that was generated as a result of that did not want to work either (ended up not being set up correctly and could not find the necessary .h files, despite the fact that it was put into the proper folder src/bindings/ScriptDev2, once again).

Thinking that I'd best try the standard Mangos branch (mangos-wotlk-ai instead of mangosr2-wotlk-ai), I checked that one out from git and compiled it (this part went smoothly again), but it didn't want to work with that standard ScriptDev2 from git://github.com/scriptdev2/scriptdev2 either (also returned a lot of compilation errors related to undefined identifiers, among the above-mentioned ones there were many ones related to script_error_log).

I tried to look around for different compilation guides online and found many ones both for Windows and Linux, but they all basically were based on an assumption that ScriptDev2 compilation should "just work", as long as it's placed in the right place and as long as it's patched (on Linux when using CMake, I assume).

What revision/version of ScriptDev2 am I supposed to use with the latest (Nov 24th, I assume) edition of Ike3's Playerbot AI branch of Mangos? Can you please help me with the compilation? Any help you can provide is highly welcome. Thank you very much in advance, and keep up the great work on the project!

P.S. Also, I have another question - which database should I use with this fork of Mangos when I finally get to compiling it successfully?

Regards,

Gadget2006

Link to comment
Share on other sites

  • 2 weeks later...

Ai Playerbot makes no core changes that could affect script compilation. There are no DB restrictions as well. Everything that works with unmodified mangos core will work with Ai Playerbot.

@Gadget2006

There is no support for Visual Studio Express for R2 branch (this is forced by R2 developers). Although you can compile Ai Playerbot with VS Express using solution files provided this is not true for ScriptDev2 R2. Please refer to R2 forum for more information about their compilation on Windows.

The code is usually tested with:

  • cmangos branch - UDB, ScriptDev2
  • R2 branch - YTDB+R2 mods, ScriptDev2R2
  • zero branch - mangos-zero DB, ScriptDev0
  • one branch - mangos-one DB, ScriptDev1
Link to comment
Share on other sites

  • 2 weeks later...

Please note that with the recent commits the Random Bot feature has been changed.

The main change is that random bots are now logged in on server start and remains logged in until the server is shut down. This means they are not dependend on any player and do not use master player anymore.

Any player with the appropriate level and gear can invite random bots to a group and the player will be bot's master until bot is uninvited. Also, limited support is added to dungeon finder system so random bots should join dungeons if there are not enough non-bot players.

Random bot feature is still experimental and available in R2 brach only at the moment. rndbot reset command is recommented to remove old bots from the system

Link to comment
Share on other sites

  • 1 month later...

I can`t compile mangosR2 with the latest scriptdev 2. I read on the website from Scriptdev2 that they don`t support MangosR2. The reason I use mangosR2 is because that is the most updated 'playerbot ai'. Mangoswotlk is hardly updated by kuzminsv.

Can somebody help me with my compile error? I can compile the MangosR2-wotlk-ai perfect. But Scriptdev2 won`t compile because of this error.

Error 1 error C1083: Cannot open include file: 'G3D/Vector3.h': No such file or directory d:\\git\\mangos\\src\\game\\WorldLocation.h 24 1 ScriptDev2

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use