Jump to content

Playerbot (archive)


Recommended Posts

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

blueboy, why you pushed commit to 'portal' but no core updates was pushed as well? I thought it should be exactly the same with what you're currently writting.

I created the branch training from the code on portal when it was at MaNGOS[10856]. I then merged the code from loot-fix.bt with training. This may have rewound the code, because loot-fix-bt was created when the core was at MaNGOS[10792].

I should really have then merged with the core again, to ensure that everthing was up-to-date. Sorry. You will appreciate that the code on individual sub-branches is 'alpha' code and does not necessarily reflect the current the status of other branches. Now that I have updated portal and blueboy, it should resolve your issue

Hope this helps

Link to comment
Share on other sites

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

Thanks for testing the training branch, I do hope to combine the commands 'training', 'learn' and 'skill' into one, before I push the code to portal. All suggestions are welcome and the use of mailboxes will certainly be considered. Oh, and thanks for the heads up on the patch from TrinityCore. I was aware of Lojack's (a.k.a MoJo) work. He has adapted playerbot to work with TrinityCore and has added some nice features of his own, that we maybe able to use. In fact his patch did enable me to get started with the training code

Cheers

Link to comment
Share on other sites

Hey Blueboy, is that possible that you add the ahbot into your branch ? Also this will help more than one, because patch applying for ahbot make error

This is the playerbot project and we focus on it's development only. You can merge the two projects yourself. I have given tips in this thread about resolving possible merge conflicts. Failing that, you can use the code from https://github.com/blueboy/ahbot that I have adjusted to merge directly with playerbot. It's the old Naicisum code, but it works. As long as you don't expect billions of items to be stocked in your auctionhouse ;)

Hope this helps

Link to comment
Share on other sites

can someone explain me the thing with training? is this a new feature?

training is the a new feature of playerbot. It basically allows players to manage their bot(s) class/profession training.The code is in the early stages of testing, but appears to work fine.

If you wish to try it out any of the code in development, we would be interested in your comments.

Hope this helps

Link to comment
Share on other sites

a little compile problem this morning with latest update of core code:

10> PlayerDump.cpp

10>..\\..\\src\\game\\playerbot\\PlayerbotRogueAI.cpp(227): error C2065: 'RACE_UNDEAD_PLAYER' : undeclared identifier

10> PointMovementGenerator.cpp

10>..\\..\\src\\game\\playerbot\\PlayerbotWarriorAI.cpp(255): error C2065: 'RACE_UNDEAD_PLAYER' : undeclared identifier

Link to comment
Share on other sites

a little compile problem this morning with latest update of core code:

10> PlayerDump.cpp

10>..\\..\\src\\game\\playerbot\\PlayerbotRogueAI.cpp(227): error C2065: 'RACE_UNDEAD_PLAYER' : undeclared identifier

10> PointMovementGenerator.cpp

10>..\\..\\src\\game\\playerbot\\PlayerbotWarriorAI.cpp(255): error C2065: 'RACE_UNDEAD_PLAYER' : undeclared identifier

Yesterday's change to SharedDefines.h messed about with the races a bit. Quick fix for the time being is to change the lines in PlayerbotRogueAI.cpp and PlayerbotWarriorAI.cpp to refer to RACE_UNDEAD.

Need to check what else was changed. Not sure this was totally intentional by NoFantasy as the note against the commit was to uncomment the races, not to change them.

Edit: looks like it was intentional. Playerbot will need updated to use the changed define

Link to comment
Share on other sites

Hi Guys,

All fixed :D I have merged both repos with MaNGOS[10944]. The adjustment made by NoFantasy makes perfect sense and I'm amazed it was not changed before. The conflict in World.cpp was due to a core/playerbot clash while adding header file references, easy to fix.

Hope this helps

Link to comment
Share on other sites

In your latest "training" branch, the "mangosdVC100" solution does not include "script" project, which means there's 11 projects in the sln, not 12. But the "script" exists in the "VC100" folder in fact.

I compiled only the "mangosdVC100"(11 projects, without "script" project), and I didn't clone and compile "ScriptDev2", then I set up the server, everything went fine. I checked the root folder, there's no "mangosscript.dll", other than that everything was the same as before. Is this normal or something's missing?

Link to comment
Share on other sites

In your latest "training" branch, the "mangosdVC100" solution does not include "script" project, which means there's 11 projects in the sln, not 12. But the "script" exists in the "VC100" folder in fact.

I compiled only the "mangosdVC100"(11 projects, without "script" project), and I didn't clone and compile "ScriptDev2", then I set up the server, everything went fine. I checked the root folder, there's no "mangosscript.dll", other than that everything was the same as before. Is this normal or something's missing?

Hi,

There is a good reason why the "mangosdVC100" solution does not include "script" project;

Whenever I compile under windows, I purposely deselect the 'script' option in Configuration Manager. This refers to the 'universal' scripting, which is not not used by MaNGOS. ScriptDev2 is compiled as a separate Project. It works, try it ;)

Hope this helps

Link to comment
Share on other sites

You are right blueboy but IMHO for quick testing and 'universal" patch i recommand using default setting.

I personaly have scriptdev2 only on my stable server and do all testing without it.

But you pethaps need some function from scriptdev2 to have playerbot work correctly?

Greetings

Link to comment
Share on other sites

You are right blueboy but IMHO for quick testing and 'universal" patch i recommand using default setting.

I personaly have scriptdev2 only on my stable server and do all testing without it.

But you pethaps need some function from scriptdev2 to have playerbot work correctly?

Greetings

Hi cyberium ,

No, playerbot does not use any code from 'scripting', either universal or ScriptDev2. I was just pointing out that the script option in Configuration Manager is not used by MaNGOS or playerbot. This is why no rules are not built into "mangosdVC100" or the other solutions (VC90) for that matter.

Cheers

Link to comment
Share on other sites

you deleted the "training" branch and recreate it, I cant see any recent "training" commit of yours on github. Right now I find that things are different from before, bots don't pick up money anymore, and materials for their professions as well. I do remember they once picked up everything useful, including cloth for first aid and meat for cooking. And bots don't loot from dead corpse, I tried "get" command with the target corpse selected, and then I got no reaction from bots. I don't know if it's because no necessary quests item left for them to loot or they simply don't loot a second time, or ...I forget the correct command of "get".

Link to comment
Share on other sites

you deleted the "training" branch and recreate it, I cant see any recent "training" commit of yours on github. Right now I find that things are different from before, bots don't pick up money anymore, and materials for their professions as well. I do remember they once picked up everything useful, including cloth for first aid and meat for cooking. And bots don't loot from dead corpse, I tried "get" command with the target corpse selected, and then I got no reaction from bots. I don't know if it's because no necessary quests item left for them to loot or they simply don't loot a second time, or ...I forget the correct command of "get".

Hi Syenet,

Thanks for testing the training branch. Sorry I messed up :( in the original branch, I merged loot-fix-bt branch with training. I should have kept the code from both branches separate. This is why I removed the original branch. The new training branch now only contains training code. This would explain why looting features no longer work. Please test out BThallid's excellent loot-fix-bt branch as well, to restore these features.

Hope this helps

Link to comment
Share on other sites

Does "loot-fix-bt" contain all features of looting and training? Are you going to merge into an integrated commit including both?

No, the code for both are separate, as they both under development. Eventually both will be merged with the master portal branch, where beta testing will be done, prior to a merge with the stable blueboy repo. If you want to test both out, you will need to get the code from both branches.

If you need help doing this, please let me know

Hope this helps

Link to comment
Share on other sites

Hi Guys,

If it is any help, I have a method to locally merge both development branches loot-fix-bt and training into the portal code, to enable you to test all.

1. clone the portal code to a directory where you wish to compile

git clone git://github.com/blueboy/portal.git <dest. directory name>

2. Inside <dest. directory name> check all available branches

git branch -a

* master

remotes/origin/HEAD -> origin/master

remotes/origin/loot-fix

remotes/origin/loot-fix-bt

remotes/origin/master

remotes/origin/training

You will need to correct for some merge conflicts, so check that your default git editor (core.editor) is useable. Mine was set to 'Vim' and I hate this. To change the core.editor ( if editor is not accessible in the system path, you may need to include this too);

git config --global core.editor <editor of your choice>

3. Merge loot-fix-bt branch

git merge origin/loot-fix-bt

Auto-merging src/game/playerbot/PlayerbotAI.cpp

Merge made by recursive.

src/game/playerbot/PlayerbotAI.cpp | 1134 ++++++++++++++++++++++++++----------

src/game/playerbot/PlayerbotAI.h | 75 +++-

2 files changed, 908 insertions(+), 301 deletions(-)

4. Merge training branch

git merge origin/training

Auto-merging src/game/playerbot/PlayerbotAI.cpp

Auto-merging src/game/playerbot/PlayerbotAI.h

CONFLICT (content): Merge conflict in src/game/playerbot/PlayerbotAI.h

Automatic merge failed; fix conflicts and then commit the result.

5. Open file src/game/playerbot/PlayerbotAI.h and search for string HEAD. There are two conflicts

First

typedef std::map<uint32, uint32> BotNeedItem;

typedef std::list<uint64> BotLootCreature;

<<<<<<< HEAD

typedef std::list<uint32> BotLootEntry;

=======

typedef std::list<uint32> BotSpellList;

>>>>>>> origin/training

// attacker query used in PlayerbotAI::FindAttacker()

enum ATTACKERINFOTYPE

Remove the highlighted text, everything is fine here.

Second

BotNeedItem m_needItemList;

// list of creatures we recently attacked and want to loot

<<<<<<< HEAD

BotLootCreature m_lootTargets; // list of creatures

ObjectGuid m_lootCurrent; // current remains of interest

ObjectGuid m_lootPrev; // previous loot

BotLootEntry m_collectObjects; // object entries searched for in findNearbyGO

uint8 m_collectionFlags; // what the bot should look for to loot

=======

BotLootCreature m_lootCreature; // list of creatures

BotSpellList m_spellsToLearn; // list of spells

uint64 m_lootCurrent; // current remains of interest

>>>>>>> origin/training

time_t m_TimeDoneEating;

Again remove the highlighted text and move BotSpellList m_spellsToLearn; // list of spells so

BotNeedItem m_needItemList;

// list of creatures we recently attacked and want to loot

BotLootCreature m_lootTargets; // list of creatures

BotSpellList m_spellsToLearn; // list of spells

ObjectGuid m_lootCurrent; // current remains of interest

ObjectGuid m_lootPrev; // previous loot

BotLootEntry m_collectObjects; // object entries searched for in findNearbyGO

uint8 m_collectionFlags; // what the bot should look for to loot

time_t m_TimeDoneEating;

6. save the file, and return to the source root and check for changes

git status

# On branch master

# Your branch is ahead of 'origin/master' by 18 commits.

#

# Changes to be committed:

#

# modified: src/game/Player.h

# modified: src/game/playerbot/PlayerbotAI.cpp

# modified: src/game/playerbot/PlayerbotMgr.cpp

#

# Unmerged paths:

# (use "git add/rm <file>..." as appropriate to mark resolution)

#

# both modified: src/game/playerbot/PlayerbotAI.h

#

7. Add modified files and commit changes.

git add  src/game/playerbot/PlayerbotAI.h

git commit -a

The editor will now automatically open, allowing your to review and change the commit message. Simply save the file.

EDIT:

Now to create a playerbot patch with everything in it, run the following bash script from the source root

#!/bin/bash -x
HASH=`git log --pretty=oneline | grep -m 1 '\\[1[0-9]\\{4\\}]' | cut -d " " -f 1`
git diff $HASH > playerbot.patch

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

I have tested this and it works. You may find a git warning about whitespaces, but these are easy to fix.

Hope this helps

Link to comment
Share on other sites

blueboy, Thanks for the guide. I just merged two branches by violence last night, I mean I've been manually modifying each line of changes according to https://github.com/blueboy/portal/compare/training...loot-fix-bt.

And after fixing several compiling errors(exactly the same with conflicts you mentioned), the solution was successfully built.

But there's still something wrong with the "looting" part, bots can't skin hide from corpse, and another big problem is that when I'm using "survey" command, bots return only the namelist of nearby areas(Stormwind City, Northshine Abbey...), not the list of game objects. This leads to the inability to order bots to gathering mine, collecting herbs or whatever behavior requires interaction with game objects.

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