Jump to content

AI Playerbot


Recommended Posts

@ike3

Hi Ike3, found a compile issue on Linux with your recent commits.

In file included from src/game/playerbot/strategy/values/PositionValue.cpp:3:

src/game/playerbot/strategy/values/PositionValue.h:9:33: error: macro "isset" requires 2 arguments, but only 1 given

I suspect that isset is being used by an include for Linux somewhere in the build.

I added the following to src/game/playerbot/strategy/values/PositionValue.h under the includes.

#undef isset

It compiled, but has been not tested yet.

I have tested the previous fixes for Linux and they are good.

Link to comment
Share on other sites

  • 3 weeks later...

tnx for your work.

But allways i use ".bot add Playername" allways says "error ocurred adding bot" and don't see my bot.

I have created a guild with .guild create command and added 2 chars from other account, but when i try to add the bots from my account same error.

Link to comment
Share on other sites

@ike3

Ran into this on the recent commits on Linux and I am struggling a little with it:

/mangos/src/game/playerbot/strategy/actions/TellReputationAction.cpp: In member function ‘virtual bool ai::TellReputationAction::Execute(ai::Event)’:

/mangos/src/game/playerbot/strategy/actions/TellReputationAction.cpp:28: error: no matching function for call to ‘ReputationMgr::GetRank(const FactionEntry*&, bool)’

/mangos/src/game/ReputationMgr.h:128: note: candidates are: ReputationRank ReputationMgr::GetRank(const FactionEntry*) const

Link to comment
Share on other sites

  • 4 weeks later...

Make sure you have playerbot enabled. To do so just create file aiplayerbot.conf in your config directory. The most imprortant setting is:

AiPlayerbot.enabled=1

Double-check that in the server console you have the output in the end:

Initializing AI Playerbot by ike3, based on the original Playerbot by blueboy

AI Playerbot configuration loaded

Without the configuration file the output would be:

AI Playerbot is Disabled. Unable to open configuration file aiplayerbot.conf

Configuration template can be found in src/game/playerbot/aiplayerbot.conf.dist.in

Link to comment
Share on other sites

  • 2 weeks later...

There is nothing really special except the core is integrated with MMaps, Armory and custom AhBot. Both three can be skipped.

The guide:

1) You need English DBC (i18n is not supported yet), but even with non-EN language you still be able to add bots in the game.

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.

Login with your main character and type "/s .bot add $CHARACTER_NAME" or "/s .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 "Hello".

@Locario3: Can you attach your Server.log and console output here? Or even a character DB backup so I can try to add these bots on my workstation.

Link to comment
Share on other sites

Ike3, thanks for your help.

I have created a copy from aiplayerbot.conf.dist.in to aiplayerbot.conf in my bin directory and now i can summon bots :-)

I have noticed that this bots don't follow me, but seems this is a config that i need to do

PD : I'm using Spanish DBC's

Link to comment
Share on other sites

First off ike3, this looks like an excellent project. THANKS for sharing! I just used a standard mangos and got it running with relatively little issue using one of the many guides found on the net. However when I attempt to compile the download from here: git clone git://github.com/ike3/mangos I get 43 errors in the game.lib all similar to error LNK2001: unresolved external symbol etc... I am a fresh noob to this stuff (and have no idea what this means, googling it has done little to change that) but think that your build we be perfect for the server I'm trying to set up for my mother with the added ah and 'teammates' it would help her do some instances with slightly OP AI's or evento finish elite quests once I set up some macros for her to click on. I'm currently using VC2008Express to Compile and wondering if that has anything to do with it. Do I need to compile with a different version in order to get this release working? eg 2005? I noted on the first post you said 'but can be easily fixed by including every file from src/game/playerbot directory' however that is a vague statement to this complete noob. Does this mean I add #include in the game.h file? Copy them to a particular directory? If anyone can take pity and help this noob make his mom happy it would be greatly appreciated!

UPDATE: While typing the above I was downloading VC2010 and is now in the process of compiling mangosdvc100. Its taking longer and I think its working as its showing alot of .cpp's related to the ah and aibot that did not show up before. /fingerscrossed will let ya know how it goes.

UPDATE 2: So, Mangos compiled but I'm not sure if the aibot info was added. I received one failed which I believe is related to the following error. I received some warnings as well and can post them if needed but I figured this was the culprit.

"LINK : fatal error LNK1181: cannot open input file 'cppunit.lib'

C:\\Program Files\\MSBuild\\Microsoft.Cpp\\v4.0\\Platforms\\Win32\\Microsoft.Cpp.Win32.Targets(268,5): error MSB6006: "link.exe" exited with code 1181."

So I tested it, the AHbot is working! One step in the right direction for me... I created another account and a toon logged out and tried to summon it with .bot add (account name) but got a msg saying the command did not exist so I guess that half isn't working just yet?

UPDATE 3: OK so I finally went to bed and looked at it again with fresh eyes...went over the thread again and found the locations of the 'real' conf files and renamed then used those after checking variables inside. AIPlayerBot is now working!!!! Seems I just missed its disabled status in the log before. THANK YOU for this! The most important part is done...yay

Also I'm currently receiving several errors related to 'characters.armory_characters_stats' etc doesn't exist. I assume this is related to the steb 2b) Setup Armory.

I plan to look this up shortly and see if I can rectify that error easily enough.

Another error I seem to get when using the 'full'/real ahbot.conf is a ton of ahbot_history/ah_price errors in my DBErrors log. I had to revert to my 'fake' two line seller/buyer enabled ah for the server not to hang. I'll keep looking into this as well. I have a sneaking suspicion I may need to rebuild my database with your new mangos build and not just compile the exe's?... I'll test that after a backup of the server...which will have to wait until the MMaps are done being built...been going for a day and still at it, sigh.

I'm a bit confused about the compile error mentioned in update 2 so any help straightening out that or the other errors mentioned above before I go 'live' and tell her it's ready would be great. I want to have as 'clean' a build as possible. All she likes to do is to quest on her own and craft/fish a bit.

UPDATE 4: Somebody smack me! ReadMe files are awesome when used eh? So I found the AHBOT readme and think that once I get a gui to dig through the sql db I should be able to resolve my 'errors' for that. I'm gonna try SQLyog first, anyone have another they would recommend for use on a 32bit XP? Still a bit confused as to how it even put up items on the AH as I hadn't set up a character for this but as long as configuring it properly does this trick it doesn't bother me :P /smack self

I checked up on the Armory and honestly, I don't see the point of adding it to the core and rebuilding my DB for the that. Unless I'm missing something: this isn't "NEEDED" to operate and will only cause issues with character deletion? Would I be able to delete characters manually if needed inside the sql or would that break things? I don't see character deletions being probable, worse comes to worse and she can use a new account...

UPDATE 5: So I fixed the AHBOT errors by adding the 'characters_ahbot.sql' located in the sql folder to the 'characters' sql db. (Did not see information telling me to this in any readme: closest thing was Step 5 of the AHBOT readme "Tune the configuration options in the configuration file and the Database"

I'm not receiving any additional errors about it like I was before though it has spent the last fifteen minutes sorting through 'existing' AH items (previously added by the ahbot on failed attempts resulting in the error messages above?) or at least I assume thats what its doing as the server.logs last line was AhBot is now checking auctions. I assume once that is finished it will revert to a usable state and perhaps update in a more friendly fashion as its so busy with that I can't even log on to see how the AH list now looks.

*****************************************************************************

All in all, I think everything is now working! I've kept all the above so you can all see how foolish I am and how much I could use the help! Information about this error and how to resolve it would make me ten times more comfortable in moving forward on making it live for her... It was the only error encountered in the 'mangosdVC100.sln' compile and resulted in 1 file not being created, but everything 'seems' to be working? Haven't done in-depth testing with the AIPlayerBot or AHBot as I just got them all working and as I said above its doing 'something' which I believe is updating its list of AH Items.

Edit: So I ended up truncating the AH table and now the server is still unusable with a never ending series of

[0ms] SQL: SELECT count(*) FROM (Select round(buytime3600/24/5> as days FROM a

hbot_history WHERE category = '*ITEM TYPE*' AND won = 1 AND buytime =

And getting ERROR:Item::AddToUpdateQueueOf - Item (Guid:xxxx in the server.log

or similar flashing by on the mangos screen. I've watched it go through each category multiple times already. Off to google possible causes....

Information about this error and how to resolve it would make me ten times more comfortable about moving forward.

"LINK : fatal error LNK1181: cannot open input file 'cppunit.lib'

C:\\Program Files\\MSBuild\\Microsoft.Cpp\\v4.0\\Platforms\\Win32\\Microsoft.Cpp.Win32.Targets(268,5): error MSB6006: "link.exe" exited with code 1181."

Link to comment
Share on other sites

Thanks for very detailed story :)

ERROR:Item::AddToUpdateQueueOf is caused by the new AhBot which is absolutely optional, you can skip it or use the default one from MaNGOS. I experience this problem sometimes too but it does not affect anything (I hope).

@Byterrr Have you changed any code in order to make it compile? I'll be very happy to include your patch in the repository to make sure it compiles fine.

Link to comment
Share on other sites

No sir..no code changes on my end. What I ended up doing in order to make it compile was downloaded the 2010 VC++ package and used the VC100.sln instead of 2008 & the VC90.sln (which still won't compile for me but at least the 2010 worked and I have a functional mangosd!)

The info you responded with for the AHBot was spot on, I found the other config file for the bot and it is now 100% working. (I had just disabled it and restarted the server after it added stuff to the AH previously.)

Thank you, this is an awesome build! My mother and I both are enjoying it.

The scriptdev2 scripts are a bit more basic then I was hoping for, but they get the job done in most cases. Only found 3 issues within the last two days requiring GM commands to 'complete' quests that seem to lack scripts enabling you to go further but I expect I'll find more as we progress. [~Not your problem I know, just saying!]

I just finished playing with my mother in deadmines and stockades using the AIBots. I'm gonna have to review all possible commands again, they seem to run around like chickens with their heads cut off sometimes (seemingly ignoring my commands even after reset) Might just be user error, I think they'll serve their purpose fine if can understand the logic behind them a bit more and tweak some macros.

This is pretty much the PERFECT build for us all things considered. Many, many thanks.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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