Jump to content

Playerbot (archive)


Recommended Posts

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

Nice, very nice jobs.

If I was at christmas, I will ask few suggestions like "repairing" by himself, and it seems the wizard doesn't know how to do some spells like icy rain

do you have a suggestion box ? :)

anyway very good joob !

Hi,

Thanks for your comments and suggestions. Please use this thread as a suggestion box.

@ALL It's my wish to encourage ideas and contributions, to improve the AI. If you would like to get your hands dirty, and tackle an issue, that would be great. Help is always available ;)

Cheers

Link to comment
Share on other sites

I have crash with playerbot MaNGOS rev.9531

Registers:
EAX:00000000
EBX:72D6B678
ECX:7F3EC180
EDX:00000000
ESI:00000000
EDI:00916D20
CS:EIP:001B:008AC8F5
SS:ESP:0023:08EFFCAC  EBP:08EFFD08
DS:0023  ES:0023  FS:003B  GS:0000
Flags:00010246

Call stack:
Address   Frame     Function      SourceFile
008AC8F5  00000000  CharacterHandler::HandlePlayerBotLoginCallback+165
008B0E1D  00000000  MaNGOS::_IQueryCallback<MaNGOS::_Callback<CharacterHandler,QueryResult *,SqlQueryHolder *,void,void> >::Execute+2D
00919318  00000000  SqlResultQueue::Update+28
00635EC5  00000000  World::UpdateResultQueue+15
00634437  00000000  World::Update+7A7
0045285E  00000000  WorldRunnable::run+8E
00916D39  00000000  ACE_Based::Thread::ThreadTask+19
002914D4  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
78543433  00000000  _endthreadex+44
785434C7  00000000  _endthreadex+D8
7C82482F  00000000  GetModuleHandleA+DF

Link to comment
Share on other sites

I have crash with playerbot MaNGOS rev.9531

Registers:
EAX:00000000
EBX:72D6B678
ECX:7F3EC180
EDX:00000000
ESI:00000000
EDI:00916D20
CS:EIP:001B:008AC8F5
SS:ESP:0023:08EFFCAC  EBP:08EFFD08
DS:0023  ES:0023  FS:003B  GS:0000
Flags:00010246

Call stack:
Address   Frame     Function      SourceFile
008AC8F5  00000000  CharacterHandler::HandlePlayerBotLoginCallback+165
008B0E1D  00000000  MaNGOS::_IQueryCallback<MaNGOS::_Callback<CharacterHandler,QueryResult *,SqlQueryHolder *,void,void> >::Execute+2D
00919318  00000000  SqlResultQueue::Update+28
00635EC5  00000000  World::UpdateResultQueue+15
00634437  00000000  World::Update+7A7
0045285E  00000000  WorldRunnable::run+8E
00916D39  00000000  ACE_Based::Thread::ThreadTask+19
002914D4  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
78543433  00000000  _endthreadex+44
785434C7  00000000  _endthreadex+D8
7C82482F  00000000  GetModuleHandleA+DF

Hi,

Can you give me anymore information. The dump does not tell me much.

Can you describe your system? i.e What mods and database are you using?

what locale are you using? i.e Russian, enGB, enUS

When does the crash occur? As the server loads or when you try and summon a bot?

Please get back to me, I'm compiling playerbot with MaNGOS[9531] as I type this. Hopefully we can find a solution.

Link to comment
Share on other sites

Sorry, I think that I'm wrong... Crash cause by something else...

Hi,

O.K , If it is any help, I've just tested the code with

MaNGOS[9531]

SD2[1635]

PSMDB[295][Project Silvermoon]

auctionhousebot[Naicisum]

autobroadcast[Xeross]old

and compiles and run without issue.

I hope you find the cause of your crash.

Cheers

Link to comment
Share on other sites

- Suggestion 2

Making bots automount themselves + the ability to detect quest objects and others... i may think that a command like .bot open object could do

Not in suggestion: it would be alot easyer if someone could teach us c++ for game scripting ... i know 2 little

Link to comment
Share on other sites

Blueboy,

Thank you for playerbot + patches. My testers love it, though it was causing seg fauls on my Debian Lenny 64-bit server. One of my players thinks its has to do with having bots in a instance... maybe a bot priest healing in an instance or having more than two bots. My current server is mucked up, so I'm going to recompile and see if that works better. Just wanted to say thanks.

skinlayers

Link to comment
Share on other sites

Blueboy:

Just thought you might want to be aware of a few playerbot compile warnings I'm getting under Ubuntu. No biggy, but I thought you might want to know:

../../../src/game/PlayerbotMgr.cpp: In member function ‘bool ChatHandler::HandlePlayerbotCommand(const char*)’:
../../../src/game/PlayerbotMgr.cpp:559: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘uint64’
../../../src/game/PlayerbotMgr.cpp:582: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘uint64’
../../../src/game/PlayerbotMgr.cpp:594: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘uint64’

Also, when I generate a patch file and apply it I get 170+ trailing whitespace warnings. Any chance you can fix this in the repo? Again, not a big deal...

skinlayers

Link to comment
Share on other sites

Blueboy:

Just thought you might want to be aware of a few playerbot compile warnings I'm getting under Ubuntu. No biggy, but I thought you might want to know:

../../../src/game/PlayerbotMgr.cpp: In member function ‘bool ChatHandler::HandlePlayerbotCommand(const char*)’:
../../../src/game/PlayerbotMgr.cpp:559: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘uint64’
../../../src/game/PlayerbotMgr.cpp:582: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘uint64’
../../../src/game/PlayerbotMgr.cpp:594: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘uint64’

Also, when I generate a patch file and apply it I get 170+ trailing whitespace warnings. Any chance you can fix this in the repo? Again, not a big deal...

skinlayers

Hi,

Thanks for the comments and information. I haven't experienced any problems with whitespaces myself, but appreciate that 170 warnings would be annoying. I have checked online and this seems to be a long standing issue. I have found a few methods to clean up the code, but I will need your feedback to say whether it works.

How do you create your patches? I posted my approach #394 and it seems to work without issue, with the existing code on blueboy.

I will amend the '%u' issue too. In the meantime, you can manually change these to '%d' and see whether your compiler still complains. I'm using Gnu c++, on a 32bit linux box (OpenSuSE 11.2), I beleive you can change the 'warning levels' as a compiler option. I'm using the default settings, and I don't get these warnings. If it is any help these are my build settings

#!/bin/bash
../configure --prefix=/home/mangos/wow2 --sysconfdir=/home/mangos/wow2/etc \\
   --with-python \\
   --enable-cli \\
   --enable-ra \\
   --datadir=/home/mangos/wow2/data

Please get back to me, Cheers

Link to comment
Share on other sites

- Suggestion 2

Making bots automount themselves + the ability to detect quest objects and others... i may think that a command like .bot open object could do

Not in suggestion: it would be alot easyer if someone could teach us c++ for game scripting ... i know 2 little

Hi,

Thanks for the suggestions, I will attempt to tackle some of these, but you will need to be patient. I still believe that the master should be the key in locating quest objects and not the bots. If you have got any ideas how to independently detect quest objects, I would be interested :confused:

The only way to learn c++, is through practice. I'm a complete novice compared the the guys who originally desgined playerbot. I'm learning slowly and I am willing to help you, if you want to have a go. Playerbot certainly deserves the attention more than one person, in orderto maintain its momentum.

Cheers

Link to comment
Share on other sites

Ok, let's try the suggestion box :)

- Suggestion 1

Repairing :

+possibility to tell to your bot to repair either at a shop or at a robot (engineering)

+ possibility to make it automatic (nice to have usually it is some addons who does that)

Hi,

Thanks for the suggestions. I kind of like the idea of repairing the bots. Maybe we could get the master to initiate the repair, by selecting the right NPC. I will definitely look into this

Cheers

Link to comment
Share on other sites

As I promised, I have tested your patches for setting bots per realm and limiting the number of allowed bots. Both appear to be working flawlessly, although testing the bots per realm patch was somewhat limited. I set up a second database and server, running on the same machine as my primary server, solely for testing the bots per realm patch at player login. Still need to check the fix intended to properly limit bots when summoned using macros.

I also included your map-vmap "fix" for Playerbot and it has worked as advertised. So far, the bots have followed terrain as well as the active character that summoned them. This has only been over the course of two days of gameplay but, no major issues encountered at this time.

Testing platform is MaNGOS-0.15 r9134, SD2 r1542, ACID 3.0.2, and UDB 0.11.6 r386 running on WinXP SP2 platform. Core patches used are AHBot, Playerbot, Nameannounce, Jail, Dual Spec, and PvP Ranks And Titles.

You did good, blueboy! Who cares if you're still learning C++? You've done more with what you do know than a good number of expertly skilled coders and patchers. As my grandfather used to say, "It ain't what you know, it's what you do with it that makes you smart!". :)

It appears the AI for Playerbot follows similar conventions as ScriptDev2 for C++ scripting behavior. Would that be a good place to start for those wanting to contribute to Playerbot or have you worked out your own type of "EventAI" that triggers and controls the bots' behaviors?

Link to comment
Share on other sites

blueboy,

I've been using the same method as you san the script to find the commit hash. I've just been manually looking them up via "git log" or surfing through the commits on github.com. I've been building with evo-X + ahbot + playerbot on both Ubuntu 9.10 (Karmic Koala) 32-bit and Debian Lenny 64-bit (Ubuntu for testing, Debian for my public server). Lenny and Karmic definately use different version of the compile tools, but I believe I get the same warnings on both. I'll double check next time I do a nwe build. I can also test with straight MaNGOS as well if you'd like, so we can take the evo-X changes out of the equation.

mkdir playerbot
cd playerbot
git init
git pull git://github.com/mangos/mangos.git master
git checkout -b mangos HASH
git remote add playerbot git://github.com/blueboy/mangos.git
git pull playerbot master
git diff HASH > playerbot.patch

I replace HASH with the matching commit that playerbot is currently build off of.

To fix the whitespaces I've been using:

git apply --whitespace=fix playerbot.patch

Output (from an older post I made in the evo-X forums):

playerbot.patch:36: trailing whitespace.
/t BOTNAME free (bot shows free empty space in its inventory)
playerbot.patch:71: trailing whitespace.
in its bags or be equipped and even be soulbound. By this you can cast spells/enchantments
playerbot.patch:72: trailing whitespace.
on soulbound items ('nt' stands for 'not trading').
playerbot.patch:174: trailing whitespace.
Hardcode lowest rank spellID, use function to get highest rank
playerbot.patch:275: trailing whitespace.

warning: squelched 159 whitespace errors
warning: 163 lines applied after fixing whitespace errors.

Then I'll git diff out a new patch with the whitespaces fixed. There's still usually 1 lingering whitespace error, so I'll go into the patch file and remove the spaces manually. It applies cleanly afterwards.

I'm not concerned enough about the compile warnings to fix them manually, so I'll just wait until it ends up in the playerbot repo ;)

Thanks again!

skinlayers

Link to comment
Share on other sites

As I promised, I have tested your patches for setting bots per realm and limiting the number of allowed bots. Both appear to be working flawlessly, although testing the bots per realm patch was somewhat limited. I set up a second database and server, running on the same machine as my primary server, solely for testing the bots per realm patch at player login. Still need to check the fix intended to properly limit bots when summoned using macros.

I also included your map-vmap "fix" for Playerbot and it has worked as advertised. So far, the bots have followed terrain as well as the active character that summoned them. This has only been over the course of two days of gameplay but, no major issues encountered at this time.

Testing platform is MaNGOS-0.15 r9134, SD2 r1542, ACID 3.0.2, and UDB 0.11.6 r386 running on WinXP SP2 platform. Core patches used are AHBot, Playerbot, Nameannounce, Jail, Dual Spec, and PvP Ranks And Titles.

You did good, blueboy! Who cares if you're still learning C++? You've done more with what you do know than a good number of expertly skilled coders and patchers. As my grandfather used to say, "It ain't what you know, it's what you do with it that makes you smart!". :)

It appears the AI for Playerbot follows similar conventions as ScriptDev2 for C++ scripting behavior. Would that be a good place to start for those wanting to contribute to Playerbot or have you worked out your own type of "EventAI" that triggers and controls the bots' behaviors?

Hi,

Thanks for testing the patches. Interestly when I created the 'PlayerbotAI.DisableBotsInRealm' option, I had no real way to test it out, as I only had a single realm. Since then I have setup dual test realms on one server, and in doing so I now see that the feature is made redundant by the existing 'PlayerbotAI.DisableBot' option. The reason for this is that each realm uses a separate 'mangosd.conf' file. Thus by activating 'PlayerbotAI.DisableBot' in one or the other, you are effectively disabling bots for that realm. I will therefore remove this at the earliest opportunity.

I have found the layout of the AI in playerbot to be quite starightforward. If you wish to tackle a general AI feature, then look to PlayerbotAI.cpp file. This also redirects each class AI to separate files. If you wish to add a new feature, general or class specific, use the existing blocks of code as templates, which is the essence of object orientated programming (c or c++).

Thanks again ;)

Link to comment
Share on other sites

blueboy,

I've been using the same method as you san the script to find the commit hash. I've just been manually looking them up via "git log" or surfing through the commits on github.com. I've been building with evo-X + ahbot + playerbot on both Ubuntu 9.10 (Karmic Koala) 32-bit and Debian Lenny 64-bit (Ubuntu for testing, Debian for my public server). Lenny and Karmic definately use different version of the compile tools, but I believe I get the same warnings on both. I'll double check next time I do a nwe build. I can also test with straight MaNGOS as well if you'd like, so we can take the evo-X changes out of the equation.

mkdir playerbot
cd playerbot
git init
git pull git://github.com/mangos/mangos.git master
git checkout -b mangos HASH
git remote add playerbot git://github.com/blueboy/mangos.git
git pull playerbot master
git diff HASH > playerbot.patch

I replace HASH with the matching commit that playerbot is currently build off of.

To fix the whitespaces I've been using:

git apply --whitespace=fix playerbot.patch

Output (from an older post I made in the evo-X forums):

playerbot.patch:36: trailing whitespace.
/t BOTNAME free (bot shows free empty space in its inventory)
playerbot.patch:71: trailing whitespace.
in its bags or be equipped and even be soulbound. By this you can cast spells/enchantments
playerbot.patch:72: trailing whitespace.
on soulbound items ('nt' stands for 'not trading').
playerbot.patch:174: trailing whitespace.
Hardcode lowest rank spellID, use function to get highest rank
playerbot.patch:275: trailing whitespace.

warning: squelched 159 whitespace errors
warning: 163 lines applied after fixing whitespace errors.

Then I'll git diff out a new patch with the whitespaces fixed. There's still usually 1 lingering whitespace error, so I'll go into the patch file and remove the spaces manually. It applies cleanly afterwards.

I'm not concerned enough about the compile warnings to fix them manually, so I'll just wait until it ends up in the playerbot repo ;)

Thanks again!

skinlayers

Hmm,

I've just tried

git apply --whitespace=fix playerbot.patch

and I get the same. But why are you fixing the patch:confused: Do you get any errrors when you apply the patch or compile. (--dry-run to test the patch before applying to code). Applied to a fresh download of MaNGOS.

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

P.S I have revised the gethash script in #394, and this will automatically get the HASH from the MaNGOS commit history.

#!/bin/bash
[ -f "hash.txt" ] && rm hash.txt
git log --pretty=oneline > commit.txt
{
while read line
do
   echo $line > line.txt
   index=0
   while read -r -n1 char;    do
      MYARRAY[$index]=$char
      let "index++"
       done < line.txt

   ELEMENTS=${#MYARRAY[@]}

   i=0;t=1;n=2
   while [ $n -lt $ELEMENTS ]
   do
       [ "${MYARRAY[$t]}" == "[" ] && [ "${MYARRAY[$n]}" == "9" ] && exit
       echo -n "${MYARRAY[$i]}" >> hash.txt
       let "i++";let "t++";let "n++"
   done
       rm hash.txt
done
} < commit.txt

It looks for the pattern '[9' which is used on the MaNGOS branch, for versioning. I realise this might be different on Evo-X. I will check future commits for whitespaces, but try it without the 'whitespace=fix'.

Cheers

Link to comment
Share on other sites

so I now see that the feature is made redundant by the existing 'PlayerbotAI.DisableBot' option.

You know, now that you pointed it out, it does seem so obvious that it makes you feel like smacking your forehead and saying, "Doh!". I guess my brain was on vacation, too! lol.

Link to comment
Share on other sites

I'm mostly fixing the patch for redistribution. As far as I can tell, all the whitespace errors are on comments, so it doesn't affect the code. I just like generating a patch that applies cleaning without warnings. :)

skinlayer

Hi,

So you get the 'whitespace' warnings when you apply the patch? I never had that on my system. I will however endeavour to clean all future commits. If you still get an issue, please let me know.

Cheers

Link to comment
Share on other sites

Hi Guys,

I have some great news that you maybe interested in. I have created a 'survey' command that will detect all local gameobjects. Bots will report objects in link form, within a circular perimeter about the bot. I have also created a 'find' command to test it's functionallity. All necessary gameobject info is passed to the find command, simply by holding the shift key down and clicking on the appropriate link. This is hot off the press, and I have yet to create a working patch.

/w <botname> survey

// a specified bot will report known local objects

/p survey

// group will report all local objects

[Copper vein][Earthroot][battered Chest]

and then to test it,

/w <botname> find <link>

// bot will travel to the objects location

This is only a prototype, but it has far reaching possibilities, for further development.

* Prospecting, Herb collecting, Hunting, Skinning etc...

* Getting bots to complete those collection quests that upto now have been impossible

* Utilize the bot's class features, interacting with objects i.e Rogues asked to lockpick and open chest

I want to get you all onboard with its development, so you will be familar its workings, and hopefully encourage you to join in ;)

Hope this helps

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