[Patch] NPC Bots

Okay, since there is no official npcbots topic on Trinity forum…

What does this mod do?

Allows players to hire npc minions of player-like classes which will buff you, heal you, protect you and kill anyone trying to harm you.

What reason of making this?

Educational purpose and fun.

Where can I get this?

bitbucket. Check README for installation instructions and commands. Last supported TC revision is also listed there.

Bots are pretty much configurable so you can tune them as you like (check config).

There is no Manual or FAQ for bots so I will list general features here:

[ul][li]All classes are implemented[/li][li]80% player class spells are used by bots[/li][li]~50% talents are implemented[/li][li]Other player-only passive bonuses[/li][li]Bots grow in powers just like players[/li][li]Wise targets selection (always trying to focus one target, use AoE on mob packs etc.)[/li][li]‘Wise’ crowd control (sometimes do better than players, sometimes fail miserably)[/li][li]Combat positioning (trying to get behind target’s back etc.)[/li][li]Throroughly scripted ultimate spells (cooldown > 4 min)[/li][li]Managable equipment (bots only gain bonuses, visual changes only on weapons)[/li][li]Managable roles. Bots with Tanking role will always try to keep aggro, Bots with no DPS role will never attack etc.[/li][li]LFG integration. Bots can be used with Dungeon Finder[/li][/ul]
What not to expect:

[ul][li]Perfect balance between classes (in fact, even good balance)[/li][li]User-friendly behavior in PvP (bot pack will bring down hell on anyone who touches them even slightly)[/li][li]Easy raiding / good events handling. Unfortunately, bots don’t recognize one-shot boss spells or special actions player needs to perform during the event[/li][/ul]

Here are some basic tips:

[ol][li]You can only set follow/attack distance by talking to your bot. Value determines botparty formation size and max attack range (zero means never attack anyone, only CC/heal). Check commands for more info.[/li] [li]Bots always (if have dps role) attack your target if either you or target is in combat. Use wisely.[/li] [li]You can see your bot’s stats by using /bonk at them.[/li][/ol]

If you have a question ask it here.

If you are having issues with bots please make an issue on bitbucket instead.

actually, there is, but, the poster called it playerbots…

It would also be good of you to mention who’s version of npc bots you have used for this, as I’m sure you didn’t make it from scratch.

Edit: just looked at the bitbucket and saw that you based it on the version lordpsyan was maintaining, just be aware that he also didn’t create most of the patches he maintained, either.

afaik the original creator of bots is Yad (from mangos); there were only three classes available etc.

Amongst other people who ever worked on npcbots are peldor, maximius, Machiavelli, Paradox (is that you?) and others, you can just look here or here.

Very first TC version of npcbots (warning big commit)

And now 98% of the old code is rewritten, and added much more.

The sad thing is that this mod is usually used by repack makers of all kind, but since I get feedback I’ll deal with it.

Yes, that is me.

This is still the best option if you want to play alone with trinitycore. It doesn’t make it totally a single player game but it does the job. Only problem at the moment is the not counting as party members problem. Same with raid, and because of that i had a few issues with making a bot acting as maintank (.maintank). It just didn’t work and sometimes it does work.

The player bots is from mangos by ike3

http://ike3.github.io/mangos/

Would be fun if this could be integrated with TC. Would make the game more complete to play single player.

Anyway love it trickerer, good job so far! I use it all the time, i wouldn’t play the game without it. Keep it up!

It would be extremely nice if ike3’s player bots was available for the latest trinity core rev. The stability I get with TC compared to mangos is huge. With that said, it could of been the intergrated player bot code, because it really hogged up resources. I had mine stabled off leaving my computer about 40% spare resources and eventually the server woudl crash, usually within an hour or less. TC with npc bots is runs like a champ for hours on end with nothing remotely looking like a problem.

Player bots would be neat becaues you could essentially level up 5+ characters at once. Pretty sure player bots had a lot more commands you could pass to the bots. Also having them running around the world doing stuff really made it feel open.

With that kind of bot ai running around, it gives you a feel to a busy world, but it also lets builders focus on interesting encounters and events.

I love all this coding stuff. You can liternally create your own game with all this.

I can’t explain this better then you do! This is exactly what would give the game that extra omph /emoticons/default_biggrin.png

Awesome <3 good for a low population server

TC + AHBot + NPC Bots = just awesome for small servers.

Thank you guys, having a blast! /emoticons/default_smile.png

I cant use bot commands, noting happened… when i type .npcbot

Make sure you updated your auth database with auth_rbac.sql

diff is corrupted

huh?

Love this patch, but it cant be applied in Git anymore, gives errors i cant fix.

Had no problem applying it to the core version a couple of days ago, but now it cant anymore.

Applying: NPCBots
Using index info to reconstruct a base tree...
M	src/server/game/Entities/Creature/Creature.cpp
M	src/server/game/Entities/Creature/Creature.h
M	src/server/game/Entities/Object/Object.cpp
M	src/server/game/Entities/Player/Player.cpp
M	src/server/game/Entities/Player/Player.h
M	src/server/game/Entities/Unit/Unit.cpp
M	src/server/game/Maps/Map.cpp
M	src/server/game/Server/WorldSession.cpp
M	src/server/game/World/World.cpp
Falling back to patching base and 3-way merge...
Auto-merging src/server/game/World/World.cpp
Auto-merging src/server/game/Server/WorldSession.cpp
Auto-merging src/server/game/Maps/Map.cpp
Auto-merging src/server/game/Entities/Unit/Unit.cpp
Auto-merging src/server/game/Entities/Player/Player.h
Auto-merging src/server/game/Entities/Player/Player.cpp
CONFLICT (content): Merge conflict in src/server/game/Entities/Player/Player.cpp
Auto-merging src/server/game/Entities/Object/Object.cpp
Auto-merging src/server/game/Entities/Creature/Creature.h
Auto-merging src/server/game/Entities/Creature/Creature.cpp
Failed to merge in the changes.
Patch failed at 0001 NPCBots
The copy of the patch that failed is found in:
   d:/Master Pul/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Done

I found this video which shows an NPC system on Trinity which does recognize the bots as players:

Yes, this is true, but make a raid and you don’t see anyone. Also they made playerbots (not npc bot’s) before and they update it but that’s a long time ago and it isn’t working anymore.

@ Ajaxhore

The bots need updated to the new TC this is why the patch failed
They changed the why monsters whisper and the Cast calls
Im not sure how to correct the whispers but the

  •            if (!me->IsNonMeleeSpellCasted(false))
    
  •            if (!me->IsNonMeleeSpellCast(false))
    

Im still trying to find the logic change in the monsterwhisper

[COLOR=rgb(34,34,34)]trickererWell to fix it you must:
everywhere you see ‘MonsterWhisper’ or ‘MonsterSay’ replace second argument (‘SOMEONE->GetGUID()’ → ‘SOMEONE’)

Hey guys, please be patient and just wait until next update when I’ll make this.

Heya Trickerer: I have an older version of trinity so I managed to patch my source: though after compilation I encountered those errors:

Error 27 error LNK2005: “public: bool __thiscall LoginQueryHolder::Initialize(void)” (?Initialize@LoginQueryHolder@@QAE_NXZ) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 21 error LNK2005: “public: void __thiscall WorldSession::HandleAlterAppearance(class WorldPacket &)” (?HandleAlterAppearance@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 19 error LNK2005: “public: void __thiscall WorldSession::HandleChangePlayerNameOpcodeCallBack(class Trinity::AutoPtr<class PreparedResultSet,class ACE_Thread_Mutex>,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)” (?HandleChangePlayerNameOpcodeCallBack@WorldSession@@QAEXV?$AutoPtr@VPreparedResultSet@@VACE_Thread_Mutex@@@Trinity@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 4 error LNK2005: “public: void __thiscall WorldSession::HandleCharCreateCallback(class Trinity::AutoPtr<class PreparedResultSet,class ACE_Thread_Mutex>,class CharacterCreateInfo *)” (?HandleCharCreateCallback@WorldSession@@QAEXV?$AutoPtr@VPreparedResultSet@@VACE_Thread_Mutex@@@Trinity@@PAVCharacterCreateInfo@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 3 error LNK2005: “public: void __thiscall WorldSession::HandleCharCreateOpcode(class WorldPacket &)” (?HandleCharCreateOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 23 error LNK2005: “public: void __thiscall WorldSession::HandleCharCustomize(class WorldPacket &)” (?HandleCharCustomize@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 2 error LNK2005: “public: void __thiscall WorldSession::HandleCharDeleteOpcode(class WorldPacket &)” (?HandleCharDeleteOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 6 error LNK2005: “public: void __thiscall WorldSession::HandleCharEnum(class Trinity::AutoPtr<class PreparedResultSet,class ACE_Thread_Mutex>)” (?HandleCharEnum@WorldSession@@QAEXV?$AutoPtr@VPreparedResultSet@@VACE_Thread_Mutex@@@Trinity@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 1 error LNK2005: “public: void __thiscall WorldSession::HandleCharEnumOpcode(class WorldPacket &)” (?HandleCharEnumOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 8 error LNK2005: “public: void __thiscall WorldSession::HandleCharFactionOrRaceChange(class WorldPacket &)” (?HandleCharFactionOrRaceChange@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 18 error LNK2005: “public: void __thiscall WorldSession::HandleCharRenameOpcode(class WorldPacket &)” (?HandleCharRenameOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 25 error LNK2005: “public: void __thiscall WorldSession::HandleEquipmentSetDelete(class WorldPacket &)” (?HandleEquipmentSetDelete@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 24 error LNK2005: “public: void __thiscall WorldSession::HandleEquipmentSetSave(class WorldPacket &)” (?HandleEquipmentSetSave@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 26 error LNK2005: “public: void __thiscall WorldSession::HandleEquipmentSetUse(class WorldPacket &)” (?HandleEquipmentSetUse@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 7 error LNK2005: “public: void __thiscall WorldSession::HandlePlayerLogin(class LoginQueryHolder *)” (?HandlePlayerLogin@WorldSession@@QAEXPAVLoginQueryHolder@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 5 error LNK2005: “public: void __thiscall WorldSession::HandlePlayerLoginOpcode(class WorldPacket &)” (?HandlePlayerLoginOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 22 error LNK2005: “public: void __thiscall WorldSession::HandleRemoveGlyph(class WorldPacket &)” (?HandleRemoveGlyph@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 11 error LNK2005: “public: void __thiscall WorldSession::HandleSetFactionAtWar(class WorldPacket &)” (?HandleSetFactionAtWar@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 12 error LNK2005: “public: void __thiscall WorldSession::HandleSetFactionCheat(class WorldPacket &)” (?HandleSetFactionCheat@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 14 error LNK2005: “public: void __thiscall WorldSession::HandleSetFactionInactiveOpcode(class WorldPacket &)” (?HandleSetFactionInactiveOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 20 error LNK2005: “public: void __thiscall WorldSession::HandleSetPlayerDeclinedNames(class WorldPacket &)” (?HandleSetPlayerDeclinedNames@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 13 error LNK2005: “public: void __thiscall WorldSession::HandleSetWatchedFactionOpcode(class WorldPacket &)” (?HandleSetWatchedFactionOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 10 error LNK2005: “public: void __thiscall WorldSession::HandleShowingCloakOpcode(class WorldPacket &)” (?HandleShowingCloakOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 9 error LNK2005: “public: void __thiscall WorldSession::HandleShowingHelmOpcode(class WorldPacket &)” (?HandleShowingHelmOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 16 error LNK2005: “public: void __thiscall WorldSession::HandleTutorialClear(class WorldPacket &)” (?HandleTutorialClear@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 15 error LNK2005: “public: void __thiscall WorldSession::HandleTutorialFlag(class WorldPacket &)” (?HandleTutorialFlag@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

Error 17 error LNK2005: “public: void __thiscall WorldSession::HandleTutorialReset(class WorldPacket &)” (?HandleTutorialReset@WorldSession@@QAEXAAVWorldPacket@@@Z) already defined in game.lib(CharacterHandler.obj) C:Rdeksrcserverworldserverscripts.lib(taleoftheancientshordestory.obj) worldserver

They’re not related to your script at any how… though as a result of using the patch… I encountered those errors.