bot cleric CH vs Regular heal
My bot clerics are always casting CH heals, even when i take a little bit of damage. I want them to only CH when I get down to about 50% health or so. Ive tried a few things but nothing worked, how can I modify the code to have this happen?
|
I think i got it. CH is being classified as both a regularsingletargethealspell and a completehealspell in spdat.cpp. I just added "&& != spell_id != 13" in the check for regularsingletargethealspells and now it works fine. I reccomend anyone do the same if you want your clerics to only CHeal at certain percentages
|
my bad, i meant
"&& spell_id != 13" |
Code:
bool IsRegularSingleTargetHealSpell(int16 spell_id) { I would have to test this out to see why that change would have any effect, as it shouldn't with the complete heal check already in there.. |
It appears I was mistaken, bots still are CHing when they shouldnt. Setting the percentageheal to only cast at < 55 health isnt working. Trying a few different things nothing is working so far.
|
It looks like its working as intended when i target myself and do a #damage. They are healing me with the correct spells. When I am engaged in a fight, however, the cleric bot is CHing me no matter what my HP is.
EDIT- Further testing shows that cleric heals good when he is commanded to guard with #bot group guard before I am in combat and heals intelligently while I am in combat (but only if he is still guarding) or if there is no combat at all. However, once the cleric joins the fight wither with #bot group attack or #bot group follow, he CH's as his default heal no matter how much health I have. |
I think i figured it out. I found the code for the engaged bots trying to heal and noticed it doesnt have any entries for percentageheal or regular heals so im guessing thats where the problem lies.
EDIT - tried modifying to the following: Code:
// Evaluate the situation |
I finally got it
|
What did you change, and what was the result?
I've been really busy so I haven't been able to test this myself. I hope to have more time this weekend. |
There were no checks for regular heals in the bot hasaggro heal code, I just had to modify the existing code to what I wanted which was this:
Code:
// Evaluate the situation Besides the archetypes that i added checks for I also added checks here to reflect the change in clerics behavior as he hits level 39 and gets cheal. (39 on my server I dont remember if thats the stock peq CHeal level). I need to change the target checks for levels to a botlevel check instead to account for different level bots in our group if we ever get there. (just noticed after posting) Code:
if(hpr < 75 && (tar->GetArchetype() == ARCHETYPE_CASTER) || (hpr < 55 && (tar->GetArchetype() != ARCHETYPE_CASTER) && (tar->GetLevel() >= 39)) || (hpr < 75 && (tar->GetArchetype() != ARCHETYPE_CASTER) && (tar->GetLevel() < 39)) || (botClass == BARD)) { I also did modifications to the hpr levels in the check for heals out of combat. Just had to add some archetype checks and modify the existing hpr values. |
I'll check your changes out. I know the heal ai can be updated even more to better incorporate the bot stances, but I've been trying to level up my other accounts on live to better test mercs and their spell casting.
May I ask what kind of content you are on? The reason I ask, and a reason this ai is so difficult to get right is that there's a big difference beween early planes and later expansions where trash regularly hit for more that 1k at lvl 65. I'm in EPs in POP, and have been working on progressing through GoD. I'm currently getting ready to start the raids in KodTaz, as I just finished the group trials. In KodTaz, a Ra'tuk rabidfury hits for between 400-1200, 2 attacks per round. If he averages 1000 per hit and hits twice per round, in 2 rounds, he will have done 4000 damage. To survive, the tank would have to have at least 8k HP if you start CHeal at 50%. If you have 50.111% and are hit twice, you could be at only 2k hp (assuming 8k total) before CHeal is even cast. There's no way you survive unless very lucky. Even if CHeal is cast at 50%, you will be dead in 2 rounds, which will probably happen in less time that it takes to cast CHeal. My tank bot is ~10hp, so he could survive a little longer, but if he gets an add, he's done. I purposefully made complete heals a little early or cast too often, but I'd rather that than have my tank die on trash mobs. This is a good example of the potential of stances, as reactive would cast fewer complete heals but would be less mana efficient. |
I play in mostly classic zones. My server is mostly classic up to the bots and their spells. Perhaps some more checks can be added to account for the combat in later expansions. I was also thinking about making CHeal check for the targets max health subtracted from his current health and if its 1200 or higher then cast a CHeal or if not a regular heal.
|
All times are GMT -4. The time now is 01:41 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.