Multiple bot questions.
I have recently built up an EQEmu server for me and some friends. We have been playing with bots as well. Here are some questions and potential issues we have. Let me also state I am not a code expert but will try to understand and would love to learn.
Feel free to grab a question below that you feel comfortable answering. Thanks in advance. 1. Where are the scripts that tell the bots how to act and what to do? I use HeidiSQL for editing the database but is the code for their actions in a separate location? 2. Originally I was having problems with Bards playing combat songs. I found a thread that said to increase the type from 8 to 1024. This fixes it for the most part. The problem I have is that the bard appears to struggle at keeping the songs going. Most fade before he starts playing them again. Is there a setting I could look into to modify the refresh or is this a limitation on how the songs are coded? 3. Last bard question. He seems to try and twist 5 songs while out of combat. Is there a way of adjusting this to less so that the important one like health/mana regen are going and not fading? 4. This goes into question one. I would like to set it up where melee classes, except tanks, move to the back of the mob like rogues. I saw someone post the rogue code but I have no idea where the code is. I figured i could copy that for all classes I wanted to move to the back? 5. Back to referencing 1 again. I noticed anomalies like casters not hasting my SK but would other melees and pets. I assume this is a potential flag in the code that tells what valid targets for the spells are? I understand them not wasting the mana to haste a pure casters. Maybe even turn it off for pets as well as I believe most casters have their own personal pet haste? 7. What is the best way to modify spells a bot casts. Is HeidiSQL sufficient enough? I assume if I add or remove a row the id column will automatically adjust the numbering? Checking beforehand so that I don't destroy something. I know I asked a lot of questions. I didn't want to create a bunch of threads but I know it can be an eyesore having so much in one thread. For those that stuck in there, thanks! |
Quote:
All bots are designed to process variable information loaded from the database, which gives them specialized behaviors. Quote:
The idea was to allow bard bots a different set of songs while out of combat..stuff like Selo's and other appropriate songs. (ref: https://github.com/EQEmu/Server/blob..._OOC_Songs.sql) Quote:
Plus, not all songs have an 'even' duration/recast schedule, so there's always the possibility of a 'missed' song casting. Quote:
Of course, you could always virtualize the function and create a polymorphic, derived class function for it. Quote:
Quote:
You should learn about the priority system as well as the type bitmask before making any changes, however. You should never delete entries from `spells_new` as that affects every entity that uses the spell data. EDIT: This query will show the ids of the bot spell lists Code:
SELECT * FROM `npc_spells` WHERE `id` BETWEEN '701' AND '712' Code:
SELECT * FROM `npc_spells_entries` WHERE `npc_spells_id` IN (SELECT `id` FROM `npc_spells` WHERE `name` LIKE 'Bard Bot') Code:
SELECT * FROM `spells_new` WHERE `id` IN (SELECT `spellid` FROM `npc_spells_entries` WHERE `npc_spells_id` IN (SELECT `id` FROM `npc_spells` WHERE `name` LIKE 'Bard Bot')) |
Thanks for the reply.
Okay so the bot code has to be modified before compiling the server code? Do you know which files contain the code? |
Go digging in the code. There are a few files. Look in the zone directory. It's pretty obvious :)
Code:
bot_command.cpp |
I am new to all of this. I am not sure where the program does or does not pull from. I have read posts where someone will state that certain directories are no longer used or antiquated yet there will be something there. So even if i find something it isn't obvious to me that it is still valid. While I know trial and error is a great way of learning, it is nice to have a little guidance and you guys have been helping with that. Thanks for pointing me towards that valid information. I will eventually learn. Hopefully, I do not annoy you guys too much in the process of learning ;)
|
The thing with class Bot, it is derived from class NPC as well as class Mob (and class Entity..and...) .. so, some of the code may be in the other two classes.
You will probably see many cases like this: Code:
Mob* mob_ptr = <some rvalue>; Code:
virtual void Mob::SomeVirtualFunction(); If <some rvalue> is instantiated as class NPC, then NPC::SomeVirtualFunction() is called. If <some rvalue> is instantiated as class Bot, then Bot::SomeVirtualFunction() is called. Now, take away the class Bot virtual declaration: If <some rvalue> is instantiated as class Bot, then NPC::SomeVirtualFunction() is called. If you're using visual studio, it has some really good tools that can help. |
Uleat, I read your post above about the bot spell entries, for the life of me I cannot see where the Shaman bot references casting the spell Scale of Wolf when using the ^sow command. I am trying to change it to Spirit of the Wolf.
|
Bot command spells and bot ai spells draw from two different sources.
AI spells come from the database and probably are not up-to-date. Command spells, however, come directly from the in-memory spell sub-system: https://github.com/EQEmu/Server/blob...mmand.cpp#L118 - in particular: https://github.com/EQEmu/Server/blob...mmand.cpp#L436 You should get a log report that looks like this: Quote:
If there's an issue with what spells are being chosen, the best place to discriminate would be in the command handler itself: https://github.com/EQEmu/Server/blob...mand.cpp#L3394 Bot command 'size' shows an example of how to discriminate arguments: https://github.com/EQEmu/Server/blob...mand.cpp#L3783 EDIT: The spell system is designed to use the most level-appropriate spells available - which may not be what is desired in all cases. An argument to force 'spirit' over 'scale' would probably be the best solution..though, you could completely exclude 'scale' from the spell load by 'continue'ing if its id matches. |
Did that help?
|
Yes, Thank you.
Quote:
|
All times are GMT -4. The time now is 06:23 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.