Bot Healing Fix
I've been working on trying to get the Bots to heal me, and have come up with the following patch. This is the first time I've used diffs, so I'll put at the end what lines need to be replaced.
Diff for mob.h Code:
Index: zone/mob.h Code:
Index: zone/spells.cpp Code:
Index: zone/bot.cpp Code explanation: mob.h changes Need to add the following lines: Code:
inline int32 DontHotMeBefore() const { return pDontHotMeBefore; } Code:
void SetDontHotMeBefore(int32 time) { pDontHotMeBefore = time; } Code:
int32 pDontHotMeBefore; spells.cpp changes Add the following if statement in the for loop checking the effects of spell 2 in Mob::CheckStackConflict() Code:
if((effect2 == SE_CurrentHP) && (sp2.buffduration == 0) && !IsDetrimentalSpell(spellid1) && !IsDetrimentalSpell(spellid2)) { bot.cpp changes change the following case for SpellType_Heal in Bot::Bot_AICastSpell() Code:
case SpellType_Heal: { The next section checks the priority of the spell: priority == 1 is a HoT heal, while priority == 2 is a direct heal. Currently, since it checks priority ==1 first, if the timer has passed, the bot will cast the HoT spell and set a new DontHealBefore time. Once that time has passed, it checks priority == 1 first again, causing the bot to cast the HoT again, and it will never get to cast a direct heal. Once the heal type is determined, it then checks if the DontHotMeBefore (priority == 1) or DontHealMeBefore (priority == 2) is less than the current time, otherwise it's not time to heal them again. After the AIDoSpellCast() call, if the TempDontHotMeBeforeTime or TempDontHealMeBeforeTime have changed (meaning the spell is being cast and was not interrupted, etc.), then set the new DontHotMeBefore or DontHealMeBefore. It currently sets it even if the TempDontHotMeBeforeTime or TempDontHealMeBeforeTime have not changed, which means the spell could have fizzled or been interrupted, but it still sets a new DontHealMeBefore (especially bad if it were a HoT, and it won't check again for a new heal for 18 seconds). Now, if a direct heal is cast, it sets a new DontHealMeBefore == 4 seconds for Complete Heal and 1 second otherwise. One thing I did notice, was that if I have a cleric start casting a complete heal, and a druid or shaman in my group, the druid or shaman will have healed me some before the complete heal lands. I know this could be fixed by setting DontHealMeBefore to CurrentTime + 10 seconds, but it's at 4 seconds to allow a complete heal rotation. Besides some wasted mana, it may not be so bad right now to allow this, because currently, you could have a cleric cast a complete heal when someone is at 10%, since there are no other healing spells a cleric can use besides complete heal from lvl 39 to 69. Feel free to give feedback and advice if you decide to test it out. |
I also have other fixes that I'm currently testing (95% coded), and should have up sometime this weekend, barring any problems anyone finds with this code. The changes include:
If I don't hear about any bugs with the above code, I'll submit these changes once I can test out the group heals (Need to do some raids!). |
nice work on this, the AI has really increase with this patch.
|
Sorry Capn... are these code changes on the SVN as a branch or anything? I would like to help test your changes out, but not really comfortable (read experienced) doing the code changes myself, although I would be ok with attempting a windows compile from the downloaded source off SVN if that were possible.
Kaain |
Quote:
Thanks for the kind words, leslamarch. I play on my own server by myself, so healing bots are kind of required for me to be able to play without giving myself the best equipment. I just unfortunately don't have the hours and hours to play.. |
Good work man, I wish others would spend more time on bot AI than fluff. Very good work. Get bards working and I'll reward you with further accolades.
|
Quote:
Thanks. After I get the 2nd round of healing updates posted (soon as I can test group heals thoroughly and figure out what's screwy with pets), I can take a look at bards. Unfortunately, I have a feeling the fix will be a bit more involved, having looked through the code some. Who knows, though. |
Hi,
I just added your code changes, (the only ones in the thread thus far) I'm really looking forward to trying it out. -Lax |
I just patched this into SVN rev 1052...
testing it out right now. Seems to be doing ok with straight regen spells... I'm not so sure about multi-component buffs that have a regen segment to them. While testing, I used Ranger lvl 48 buff "Force of Nature" ( http://lucy.allakhazam.com/spell.html?id=2595 ), and my first run with that resulted in no heals from the Cleric... Other than that it seems good so far... I haven't tried putting a warrior in a group with 4 clerics yet... I'm gonna keep testing the regen + heals thing for a bit ... I'll try out a CH cycle tomrorrow |
OK, I just looked more into that Force of Nature + heal issue I had... Looking back at my eqclient logs and with additional testing, I found the cleric wasn't healing me because it was out of mana... which is obviousely "normal" :P
So, as far as I can tell, this does fix the regen/chloroplast/regrowth + HOT + Direct Heals bug that a lot of people have been talking about... |
CH rotation seems to work ok... though it could go a bit faster. I just tested it against Dozekar the Cursed w/ a 6-group lvl 55 bot raid. The MT was grouped with 4 clerics and a shaman, the MT stayed up until the rampages started coming (around 40% health left on Dozekar).
Prior attempts with a 6-group lvl 55 bot raid against Dozekar would result in failures 100% of the time normally with Dozekar still at about 20% health. This was the first time I killed him without having to resort to more than 8 groups, and did not have to "zerg"... I think it's probably good as is, but being able to adjust the CH Rotation speed in game would be the cat's meow. As it stands, a recompile for a 3 or even 2 second rotation is acceptable at this point in time, IMO. |
This change is awesome.
I did my level 60, 4 group against Venril. I'm now able to keep the cleric group in the shadows, and maintain my healing needs while staying out of range of his pesky mesmerization. I had problems with my commands macros and wound up wiping. As soon as I clean up my macros I should be able to do even more testing, but so far these changes have helped me IMMENSELY. thank you very much. Lax. |
Yeah, same here...
Although, I did find some weirdness yesterday where my group's cleric was refusing to heal during a raid (all other clerics in the other groups were doing their job though)... not sure what that was about, possibly an issue with my compile, but I won't be able to really investigate it on my end until the weekend arrives... |
Glad to hear this has helped you guys.
Quote:
One issue with lowering the time between complete heals would be that it would allow much more healing in a regular group by backup healers while a cleric was casting complete heal. If the new raid system is implemented, I'm sure the logic could be changed to lower the time between complete heals for groups in a raid, which would help with those issues, while keeping regular group healing as it is. There's nothing like the cleric casting a complete heal, with my druid and beastlord healing me to full before the complete heal lands. ** UPDATE ** Until I can get other bot groups to work, I will have trouble testing out my group heals. I have somehow broken my cleric again (I think from changing how it finds which player to heal). I hope to have enough time in the next couple of weeks to finish testing group heals. Maybe even better than the group heals are something other than complete heal for the cleric to cast. |
I've been playing with this code tweak on my server... and i seem to be getting random times where the cleric bot(s) goes on strike. I just can't pin it down to what's causing it yet. My most recent recompile seems to be behaving more reliable though.
So far, the only thing that I could identify as a common denominator has been dieing in the zone i'm bound in. Was in Kael making repeated attempts on King Tormax, and found that my Cleric stopped healing me after my first death. To fix it, I rebound in PoK, and restarted the Kael zone (Kael is a static zone on my server). I'll see if I can force the cleric to stop healing me again on Friday, and let you know how it goes... |
All times are GMT -4. The time now is 07:36 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.