PDA

View Full Version : Yet another Bot problem


akathanam
11-14-2014, 05:02 PM
Lately, my bots stop attacking mobs. (Casters still cast spells, it is just the melee ones that do). My (uneducated) guess it happened after one of the commits which changed int to int32, as the HP (and MP, sometimes Haste) of newly created bots show a large, negative number.

That is with the latest git pull, and latest (freshly created) database with patches.

Reverting to the last commit before the int/int32 change (https://github.com/EQEmu/Server/commit/38f1e8847cb309a4b35cbdd864ded967d3ccb1a0) fixes that problem.

Burningsoul
11-14-2014, 05:20 PM
As has been stated numerous times by Akka the last few weeks, bots are FUBAR'd right now. Best to hang with an old version if you want botly goodness for the time being.

Furniture
11-15-2014, 12:03 AM
I created a fresh server with bots recently and wasnt aware that they were broken so when i came across my bots having 700K hp, i went and fixed it in my code. Ill post it here if anyone wants it, as well as post more fixes if there are more problems with bots.

Note: I dont use the SoD client so i omitted the SoD client hp rules completely.

int32 Bot::GenerateBaseHitPoints()
{
// Calc Base Hit Points
int new_base_hp = 0;
uint32 lm = GetClassLevelFactor();
uint32 Post255;

if ((GetSTA() - 255) / 2 > 0)
Post255 = (GetSTA() - 255) / 2;
else
Post255 = 0;

new_base_hp = (5) + (GetLevel()*lm / 10) + (((GetSTA() - Post255)*GetLevel()*lm / 3000)) + ((Post255*GetLevel())*lm / 6000);
return new_base_hp;
}

this gives bots same hp as a player of that lvl/class in titanium, when i have some time and bots arent fixed yet ill post my fixes as i do them

ionhsmith
11-19-2014, 09:02 PM
I run my server with bots ... for the most part they do what they are suppose to ... I really like playing with them especially on a lower player base server... I wish they were 100% because raiding with them would be a fun idea... I tried to start a raid group with them to see what happens but they will not group and show up in the raid ... If there is anyway to fix them I would be happy to help.

werebat
12-25-2014, 01:40 PM
Yeah, my bots HP is -629928384. She is a caster and heals and buffs like she is supposed to, but dies on the first hit. I did notice that her STR is 1. Maybe that is related?

atrayas
12-25-2014, 07:02 PM
Iv'e noticed as well that when a melee bot gets slowed or if it dies and is respawned, that they attack like they have 0 delay. It is quite insane lol.

werebat
12-26-2014, 02:54 PM
After more testing on latest build from this morning 12/26/14, it appears the bot HP is still messed up as above. Also the merc heal spells are not working properly. For mercs they are healing 0 hp, you see the spell effect on the character, but the HP bar does not move. All probably related to the int32 change.

ionhsmith
01-04-2015, 05:37 PM
I just did latest build and Enchanter bot despawns soon as you start attacking something ... so i made a ranger bot and it doesnt attack ... I wish i knew how to fix them because they are a great asset to low volume servers.

zeldik
01-05-2015, 10:36 AM
yeah ive had problems as well seems only mages and clerics working for me berzerker,monk,and other melee just stand there and do nothing havent tested any others lately.

Riklin
01-07-2015, 01:41 AM
I am also having merc issues on HallsHavoc. Sometimes when you load or zone, the stances disappear and the merc stops doing anything. The only ways I have found to fix it are to either dismiss the merc and get another, or to suspend the merc, wait for the time to stop then zone then bring up the merc and pray. This is readily repeatable...

Rick

werebat
01-10-2015, 11:14 AM
As of latest build yesterday, I too can confirm what Riklin stated. Just suspend and unsuspend to get them active again.

werebat
01-21-2015, 09:26 AM
As of yesterdays build, the bot STR issue is resolved. In previous builds, bots had an STR of 1 but now its back to normal. The HP problem still exists. So there is some progress.

dfusion111
01-24-2015, 04:54 PM
The code Furniture provided fixed the melee bots not attacking issue. However it needs 1 extra line to fix some other problems with the bots base_hp, the modified complete working function is here: in bot.cpp replace>

int32 Bot::GenerateBaseHitPoints()
{
// Calc Base Hit Points
int new_base_hp = 0;
uint32 lm = GetClassLevelFactor();
uint32 Post255;

if ((GetSTA() - 255) / 2 > 0)
Post255 = (GetSTA() - 255) / 2;
else
Post255 = 0;

new_base_hp = (5) + (GetLevel()*lm / 10) + (((GetSTA() - Post255)*GetLevel()*lm / 3000)) + ((Post255*GetLevel())*lm / 6000);

this->base_hp = new_base_hp;

return new_base_hp;
}