Jump to content

Playerbot (archive)


Recommended Posts

Hi LordPsyan,

Thanks for the suggestion. I have already considered this and realised that it would cause more problems than it would solve.

I appreciate what your saying, but publishing standalone patches doesn't make life easier for everyone. From a development point of view, it would be a pain in the butt. The playerbot patch might never be placed in the core, but it has to work with the core. If several developers were all working on different elements of the same project, they would need to publish patches for every change (Git regulate this). It wouldn't be long before the forum was bombarded with users asking why code from one developer conflicted with code from another.

I endeavour to keep all the repos up-to-date and I have lost count of the many times I have explained how easy it is to create standalone patches from the existing repos and branches. If anyone would like to work on the project, I would be only too glad to add them to the collaborators list. Git is quite easy to use, once you get the hang of it :D and if your not sure about something, just ask.

Hope this helps

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

I know it's been some time since I've posted in this thread, but I follow it religiously. Playerbot has been in my list of "must-have" mods for a very long time.

blueboy, I am still amazed by the ingenious features you keep adding to PB, as well as the brilliant work of other contributors.

Please keep doing what you do so well! :D

I am curious about your findings regarding ike's PlayerbotAI fork, blueboy. Have there been any scripts or code you've considered for merging into this project? The "auto-taxi" feature is so useful, I was hoping there might be other gems you've found in ike's code that can further expand PB's amazing growth.

Link to comment
Share on other sites

I am curious about your findings regarding ike's PlayerbotAI fork, blueboy. Have there been any scripts or code you've considered for merging into this project? The "auto-taxi" feature is so useful, I was hoping there might be other gems you've found in ike's code that can further expand PB's amazing growth

Yes indeed there is lots of scope to improve playerbot with ike3 code. I would also like thank a gentleman who now appears to have vanished.

In mid December a friend drew my attention to a post on TrinityCore forum, that now no longer exists.

http://forum.trinitycore.org/topic/23717-bots/page__view__findpost__p__163526

Interestingly, I registered at the forum so I could to read this post and my account has also been removed. Anyway, the post introduced a port of this project to TrinityCore, and was called

Playerbots for TC2

(# Parent 353b24baaedbb9dda1c38da3d10e0b3f678a2f2f).

I know it was ported from this project because I recognised code that I had written. This was not a problem, because the guy had added some great features that I was sure that we could be use in playerbot. In fact, I got the idea of the training code from his work.

I have just had to re-register at TrinityCore to locate this post, so I could give the guy some credit and it's gone. At the time, I took the trouble to copy his post and I'm sure you will find it interesting.

Finally figuring out mecurial, made my first patch today. This is just Playerbots, I haven't tried to get NPCBots to work yet. Builds fine with r10549, but only tested on r10272.

Things I've changed/added:

"Guild Bank" inventory management. Just select you bot when not in combat, and it will turn him into a Guild Banker, allowing you to activate him to access the inventory of all your bots. (No checks yet for >6 bots, so could crash if you do). There are a few oddities: 1) you can't directly "store" a conjured item. You have to drag an item out of the "Bank" to swap with the conjured item instead. 2) I don't have a way yet to show which banks slots are unavailable for storing (aka, don't correspond to a slot in the bots bags). You can see the remaining free inventory in the "Stacks available to withdraw" section at the bottom. 3) If you try to use this interface within about the first 15 seconds of logging in, the server sends the guild permissions for your actual guild, and messes up what you can see/not see in the guild bank. Just close/reopen to fix. It only happens once at login. 4) I haven't implemented splitting stacks yet, so you have to split them before you want to move them

Vendors: Now when you activate a vendor, he/she will give you a list of options, for example if you had two bots "Bob" and "Frank", the options would be: "Show me your goods". "Bob: Show me your goods", and "Frank: Show me your goods". Pretty obvious, select the first one to buy/sell your own items. Select the ones with the bots names to sell their items to the vendor.

Trainers: Same sort of menu as above for the vendors, only for training spells and resetting talent points. Because I had to trick the client so you can actually see the skills the trainer has to offer, the skills show up in alphabetical order (and are "recipes") instead of order of player level. It's a little weird, but it works.

command "learn <talent_link>". Use this with the inspect window. Shift click on the talent to get the link to tell the bot what talents to learn

Loot: It bugged me that when looting non-creatures (skinning, mining, etc) if you didn't "beat the bots to it", then there would be nothing to loot. I fixed this, but somewhere in there caused another bug: If you try to loot a non-creature item before you loot a creature item, then you can't. Not sure why, I'm trying to figure it out. Basically, as long as you loot a creature once, you'll be fine.

Loot: (untested) If there's an item with loot for one of your bots, but not you, it'll still show up as lootable for you, so you can activate it and then your bots will get the loot. I haven't actually gotten a chance to test this one out yet.

Combat: I did some tweaking on how the bots choose targets. Now they will assist other members in your group as well as their pets. There shouldn't be any side effects from this.

Buffing: Bots now will also buff pets.

There's a lot of inconsistent coding standards in the files. Mostly because I have a different style than the original. I definitely have not finished all the stuff I want to do with this. Plus there's lots of things that need work still so if you guys like what I've done, give me suggestions and such.

Also, I will probably be without internet for anywhere from a couple weeks to a couple months here soon (stationed on a submarine), so if I don't responds, that's probably where I am.

Shame, the only reference I could find to Playerbots now on the TrinityCore forum was from a thread started by LordPsyan in early January.

There is lots to do, so if anyone wants to get their hand dirty :)

Cheers Guys

Link to comment
Share on other sites

*sigh* It's dirty thieves like Mojo that kills innovation in any community. I especially take issue with some of those features he "added" to that "port". He even tried to claim Botguy as his own! :mad:

Does this bozo seriously believe that astute observers won't notice most of those features have been a standard part of this Playerbot for quite some time now?

My impression over your account deletion and the missing post is that it seems like someone at Trinity doesn't want you or anyone else connected to Playerbot to know what's going on over there. I'd hate to think they're trying to plagiarize Playerbot, that it was solely Mojo's doing. I know a great many private servers use Trinity because it has more "working" content ( I say that only in the sense that it does work, just not necessarily as it should by MaNGOS standards ). Maybe the need to further impress fans with yet another feature was too much to resist.

I hope the powers that be over there will come forward to contact you and clarify their stance on this matter.

On a brighter note, I've been itching to get my hands dirty. The holiday months killed my free time, but I have some spare moments now where I can roll up my sleeves and dig back into my C++ books. It's figuring out the Visual Studio Express IDE and advanced features that's proven to be the hardest part. You need a whole 'nother book just for that!

Once I've worked my way through all the chapters and feel reckless enough to jump into the deep end, just point me in the right direction and I'll go at it like a certain famous, pink, drum-beating, battery-powered bunny...wearing cool shades! ;)

Link to comment
Share on other sites

the guys at TC have problems with the bots compability now .. thats why they asked here.

I just remembered that you also kindly drew my attention to this work.

hey blueboy,awsome work with the training thing.

I have a suggestion: is there any way you could bring up bots to use mailboxes ,talent management and guild vault usement ??

Here is a patch that was made for trinitycore , maybie it will be useful http://pastebin.com/hUxmGAB7

I have looked at the code the guys at TrinityCore are currently working on and it's different to the code I refer to. I compiled the code from Lojack (see above pastebin link) and it ran O.K. I just wanted to thank him for the work he had done (his additions) and perhaps open a dialog, so we can share ideas. But as I have already said, he's gone.

If anyone is interested, take the opportunity to look at the code before that goes too.

EDIT: @vladex, I still intend on looking at bot interaction with mailboxes

Cheers

Link to comment
Share on other sites

There is an Engineering schematic that allows a character to deploy a robot which has access to their bank. There was another one that created a portable mailbox, but it was dropped from the WoTLK release due to issues with using a mailbox without a fixed location. When the mailbot expired, in-transit mails could be lost or corrupted.

It wouldn't be too far of a stretch to apply similar function to a playerbot, but you might encounter issues similar to the mailbot problem when a playerbot moves or is logged out by its master. The source would no longer exist from which the destination box would receive a mail.

According to my nephew, the portable mailbox is back in 4.x and working perfectly. Somehow, the retail devs figured out a resolution to the lost/corrupted mail issues.

Link to comment
Share on other sites

Hi Skirnir,

I would like to help, but you need to give me some more information. You say that your compiling with MaNGOS [11116], but you do not specify the playerbot code your using. Also any other mods.

https://github.com/blueboy/mangos

https://github.com/blueboy/portal

and or code from one of the 'alpha' branches.

https://github.com/blueboy/portal/tree/training

https://github.com/blueboy/portal/tree/flight

https://github.com/blueboy/portal/tree/loot-fix-bt

I am current using portal with MaNGOS[11116] , plus flight branch code and have no problems.

Please get back to me

Link to comment
Share on other sites

Sorry,

one shouldn't watch superbowl live in europe and expect to write understandable postings the night after (at least not in CET). I was trying to compile Mangos with blueboy/portal master (the last branch you merged) and SD2. No other custom modification Now I tried flight branch and I have the same error: http://paste2.org/p/1235125

Date:   Tue Feb 8 08:17:58 2011 +0100

   Merge branch 'flight' of git://github.com/blueboy/portal into meister2

Now heading to work.

Regards

Skirnir

Link to comment
Share on other sites

the guys at TC have problems with the bots compability now .. thats why they asked here.

You are absolutely correct. The massive changes to TC have made some serious problems with the TC version (which I am maintaining). I am not complaining about the TC changes. Most of them rock. THe folder structure makes life easier. The Script Hooks also make the server work less, and patches easier to create. I love Blueboy's patch. He is a genius! The problem with TC's patch is simple. PlayerBots are stuck in teleport. even when right next to you, trying to summon them.gives a "already being teleported" error. I was a faithful member of Mangos for years. I got tired of multiple repos to get scripts going, and the lack of support from devs at that time. I won't switch back to Mangos, because of the major differences now. Both cores have their good and bad sides. I have searched for an easy way to extract the patch for conversion to trinity. All credit will go to Blueboy and anyone else listed in any thankyou file or headings in script files. Converting will take some time. Having the power of 2 cores using the same type of patch has benifits. can be tested by more people, and more people with C++ knowledge can assist in fixing bugs. We can't have BlueBoy doing ALL the work.

Anyways, I am doing what I do best... blabbing. I love this patch and all it has to offer. If someone would like to give the quick and dirty version of making a patch from portal I would appreciate it. Currently I cannot post it on tc's website... I pissed off a dev (im really good at that. called him an idiot for making a stupid change... I get banned, and the change gets reverted back.) but I should be unbanned soon. The rest of the devs kinda like me. I just gotta kiss Machiavelli's behind until he unbans me. Nyways, keep up the great work for this great emu, and I hope to help this community again soon.

One last note. The bots version for trinitycore that had some extras like opening up what looked like a guildbank, but was actually your bot's inventory, I never got working. So was unable to test it. Still have a copy of it somewhere.

Link to comment
Share on other sites

Hi Skirnir,

EDIT: Bear with me, I'm trying out a few ideas.So this post may well change :D

Could you zip your broken code up and post it so I can take a direct look at it. I think that is the best way forward.

You could try adding #include "../GridNotifiersImpl.h" to PlayerbotAI.cpp. It might do the trick.

Hope this helps

Link to comment
Share on other sites

Hi blueboy,i want to ask you something: is it possible to make a patch for arena/bg bots and that the bot logons in the world without a player/gm to add him ?(they do act in world by some points in sql by that way i was thinking if it is possible to make them actually play(programming them like to do quests kill hing by themselves)) the original idea belongs to yad,https://github.com/yad/easy-mangos,it isnt stable and it isnt compatible with your current branch can you make a suggestion for where is should look for modifications ?

Link to comment
Share on other sites

Unfortunately, this fix made the bot teleport the first time I brought him in, but when I ported to another city, he did not follow. I tried to summon him, and once again, "is already being teleported" dunno why.

So, how do I make a patch file from blueboy/portal ?

I tried: git --git-dir=../mangos/.git --work-tree=../portal diff > bots.patch

having latest mangos. it pulled the differences to files, and told me what files were deleted or added. the diff did not contain the files in the playerbot folder. dunno if this will work.

Arrgh, Oh well it was worth a try. There is obviously some incompatibilty between TrinityCore and your Playerbots. I know playerbot works fine with MaNGOS, I've just telelported a player (gamesmaster account) to Ironforge from Stormwind and then to Booty Bay. The bots teleported each time, without issue. I'm not familiar enough with TrinityCore to pinpoint your issue. I advise you to closely examine the debug output from the server, when you get "is already being teleported". Then place flags in the code to hone in on what is misfiring.

I have explained several time in this thread how to create a standalone patches from the repos and alpha branches, but here is a quick HowTo;

Run the following bash script (works on *nix systems & git bash shell under windows) to create the patch (Make sure your using a later version of grep.exe that supports the '-m' option, or the script won't work).

#!/bin/bash -x
git clone git://github.com/mangos/mangos.git portal_patch
cd portal_patch
git fetch git://github.com/blueboy/portal.git master:portal
git checkout portal
HASH=`git log --pretty=oneline | grep -m 1 '\\[1[0-9]\\{4\\}]' | cut -d " " -f 1`
git diff $HASH > playerbot.patch

Then to apply using GNU patch utility (remove --dry-run to actually apply)

patch --dry-run -p1 < playerbot.patch

or with git (remove --check to actually apply)

git apply --check --whitespace=fix playerbot.patch

Hope this helps

Link to comment
Share on other sites

I know that i have seen this solution already somewhere on the forum, but i can't find him anymore. I want to add the playerbot to the latest branch but i'll get stuck on merging. Does someone know how to solve this?

thx

:~/mangos/src/mangosd$ sudo git pull git://github.com/blueboy/mangos.git master
A       bot_readme.txt
A       bot_todo.txt
A       botguy_readme.txt
U       configure.ac
A       mangos_botguy.sql
M       src/game/CharacterHandler.cpp
M       src/game/Chat.cpp
M       src/game/Chat.h
M       src/game/ChatHandler.cpp
M       src/game/Creature.h
M       src/game/GossipDef.h
M       src/game/Group.cpp
M       src/game/GroupHandler.cpp
U       src/game/Makefile.am
M       src/game/Map.cpp
M       src/game/Player.cpp
M       src/game/Player.h
M       src/game/QueryHandler.cpp
M       src/game/QuestHandler.cpp
M       src/game/SpellMgr.cpp
M       src/game/World.cpp
M       src/game/WorldSession.cpp
A       src/game/playerbot/Makefile.am
A       src/game/playerbot/PlayerbotAI.cpp
A       src/game/playerbot/PlayerbotAI.h
A       src/game/playerbot/PlayerbotClassAI.cpp
A       src/game/playerbot/PlayerbotClassAI.h
A       src/game/playerbot/PlayerbotDeathKnightAI.cpp
A       src/game/playerbot/PlayerbotDeathKnightAI.h
A       src/game/playerbot/PlayerbotDruidAI.cpp
A       src/game/playerbot/PlayerbotDruidAI.h
A       src/game/playerbot/PlayerbotHunterAI.cpp
A       src/game/playerbot/PlayerbotHunterAI.h
A       src/game/playerbot/PlayerbotMageAI.cpp
A       src/game/playerbot/PlayerbotMageAI.h
A       src/game/playerbot/PlayerbotMgr.cpp
A       src/game/playerbot/PlayerbotMgr.h
A       src/game/playerbot/PlayerbotPaladinAI.cpp
A       src/game/playerbot/PlayerbotPaladinAI.h
A       src/game/playerbot/PlayerbotPriestAI.cpp
A       src/game/playerbot/PlayerbotPriestAI.h
A       src/game/playerbot/PlayerbotRogueAI.cpp
A       src/game/playerbot/PlayerbotRogueAI.h
A       src/game/playerbot/PlayerbotShamanAI.cpp
A       src/game/playerbot/PlayerbotShamanAI.h
A       src/game/playerbot/PlayerbotWarlockAI.cpp
A       src/game/playerbot/PlayerbotWarlockAI.h
A       src/game/playerbot/PlayerbotWarriorAI.cpp
A       src/game/playerbot/PlayerbotWarriorAI.h
A       src/game/playerbot/config.h
A       src/game/playerbot/config.h.in
A       src/game/playerbot/playerbot.conf.dist.in
U       src/mangosd/Makefile.am
M       win/VC100/game.vcxproj
M       win/VC100/game.vcxproj.filters
M       win/VC90/game.vcproj
Pull is not possible because you have unmerged files.

Link to comment
Share on other sites

I know that i have seen this solution already somewhere on the forum, but i can't find him anymore. I want to add the playerbot to the latest branch but i'll get stuck on merging. Does someone know how to solve this?

thx

:~/mangos/src/mangosd$ sudo git pull git://github.com/blueboy/mangos.git master
A       bot_readme.txt
A       bot_todo.txt
A       botguy_readme.txt
U       configure.ac
A       mangos_botguy.sql
M       src/game/CharacterHandler.cpp
M       src/game/Chat.cpp
M       src/game/Chat.h
M       src/game/ChatHandler.cpp
M       src/game/Creature.h
M       src/game/GossipDef.h
M       src/game/Group.cpp
M       src/game/GroupHandler.cpp
U       src/game/Makefile.am
M       src/game/Map.cpp
M       src/game/Player.cpp
M       src/game/Player.h
M       src/game/QueryHandler.cpp
M       src/game/QuestHandler.cpp
M       src/game/SpellMgr.cpp
M       src/game/World.cpp
M       src/game/WorldSession.cpp
A       src/game/playerbot/Makefile.am
A       src/game/playerbot/PlayerbotAI.cpp
A       src/game/playerbot/PlayerbotAI.h
A       src/game/playerbot/PlayerbotClassAI.cpp
A       src/game/playerbot/PlayerbotClassAI.h
A       src/game/playerbot/PlayerbotDeathKnightAI.cpp
A       src/game/playerbot/PlayerbotDeathKnightAI.h
A       src/game/playerbot/PlayerbotDruidAI.cpp
A       src/game/playerbot/PlayerbotDruidAI.h
A       src/game/playerbot/PlayerbotHunterAI.cpp
A       src/game/playerbot/PlayerbotHunterAI.h
A       src/game/playerbot/PlayerbotMageAI.cpp
A       src/game/playerbot/PlayerbotMageAI.h
A       src/game/playerbot/PlayerbotMgr.cpp
A       src/game/playerbot/PlayerbotMgr.h
A       src/game/playerbot/PlayerbotPaladinAI.cpp
A       src/game/playerbot/PlayerbotPaladinAI.h
A       src/game/playerbot/PlayerbotPriestAI.cpp
A       src/game/playerbot/PlayerbotPriestAI.h
A       src/game/playerbot/PlayerbotRogueAI.cpp
A       src/game/playerbot/PlayerbotRogueAI.h
A       src/game/playerbot/PlayerbotShamanAI.cpp
A       src/game/playerbot/PlayerbotShamanAI.h
A       src/game/playerbot/PlayerbotWarlockAI.cpp
A       src/game/playerbot/PlayerbotWarlockAI.h
A       src/game/playerbot/PlayerbotWarriorAI.cpp
A       src/game/playerbot/PlayerbotWarriorAI.h
A       src/game/playerbot/config.h
A       src/game/playerbot/config.h.in
A       src/game/playerbot/playerbot.conf.dist.in
U       src/mangosd/Makefile.am
M       win/VC100/game.vcxproj
M       win/VC100/game.vcxproj.filters
M       win/VC90/game.vcproj
Pull is not possible because you have unmerged files.

There's a good reason for this. You have updated you MaNGOS to [11167]+ and your using the code on blueboy. I will be converting the code on this repo shortly to fit in with core changes, but I just want to make sure they will not change their minds and revert to using the old 'autoconf' build.

In the meantime, please pull your code from portal which has the cmake changes.

git pull git://github.com/blueboy/portal.git

Hope this helps

Link to comment
Share on other sites

That might do the trick. Trying it right now, but now i'll get stuck on:

$ sudo git pull git://github.com/blueboy/portal.git
You asked to pull from the remote 'git://github.com/blueboy/portal.git', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.

Link to comment
Share on other sites

Hmm,

That interesting, on my system if you do no specify the branch It assume your pulling from the master. If you wish to pull from one of the alpha branches, use

<remote branch name>:<local branch name>

e.g

sudo git pull git://github.com/blueboy/portal.git flight:master

EDIT: But please remember we have not yet changed these alpha branches, so if you try to merge these with portal code you will get conflicts. If you wish to use code on the alpha branches at present, create a standalone patch and then apply this to the portal code.

Hope this helps

Link to comment
Share on other sites

Unfortunately, this fix made the bot teleport the first time I brought him in, but when I ported to another city, he did not follow. I tried to summon him, and once again, "is already being teleported" dunno why.

So, how do I make a patch file from blueboy/portal ?

I tried: git --git-dir=../mangos/.git --work-tree=../portal diff > bots.patch

having latest mangos. it pulled the differences to files, and told me what files were deleted or added. the diff did not contain the files in the playerbot folder. dunno if this will work.

Arrgh, Oh well it was worth a try. There is obviously some incompatibilty between TrinityCore and your Playerbots. I know playerbot works fine with MaNGOS, I've just telelported a player (gamesmaster account) to Ironforge from Stormwind and then to Booty Bay. The bots teleported each time, without issue. I'm not familiar enough with TrinityCore to pinpoint your issue. I advise you to closely examine the debug output from the server, when you get "is already being teleported". Then place flags in the code to hone in on what is misfiring.

I have explained several time in this thread how to create a standalone patches from the repos and alpha branches, but here is a quick HowTo;

Run the following bash script (works on *nix systems & git bash shell under windows) to create the patch (Make sure your using a later version of grep.exe that supports the '-m' option, or the script won't work).

#!/bin/bash -x
git clone git://github.com/mangos/mangos.git portal_patch
cd portal_patch
git fetch git://github.com/blueboy/portal.git master:portal
git checkout portal
HASH=`git log --pretty=oneline | grep -m 1 '\\[1[0-9]\\{4\\}]' | cut -d " " -f 1`
git diff $HASH > playerbot.patch

Then to apply using GNU patch utility (remove --dry-run to actually apply)

patch --dry-run -p1 < playerbot.patch

or with git (remove --check to actually apply)

git apply --check --whitespace=fix playerbot.patch

Hope this helps

This was exactly what I was looking for... and I always use patch -p1 <.... cuz git apply doesn't help much if it errors. Thank you Thank you. Now, if there is anything from TC or older TC patches you would be interested in, just ask and its yours :)

Kinda wish mangos would do their folder structure like TC.... then I could find the files im looking for :)

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