BosslandGmbH / BuddyWing

BuddyWing is the bot for Star Wars: The Old Republic. This repository contains the open-source components that power the bot.
4 stars 2 forks source link

MaxHealth not always returning a value #25

Closed Wired203 closed 8 years ago

Wired203 commented 8 years ago

So I have tracked down why healing is completely broke within Buddywing and it's not going to matter which bot code/ targeting code/etc is used.

MaxHealth is returning 0 on anyone but companion and self return without issue. Health is returning as it should, this causes HealthPercent to return 0 as well since it must be a calc of Health and MaxHealth. When creating a heal list the 0 is taking priority and since every heal wont move it this causes the bot to spam heal without stop.

I created another test where the heal list ignored 0 percent health and it didn't target anyone in the group, same test with Companion returned without issue.

aevitas commented 8 years ago

Thanks, it would appear the script used for various character types isn't the same script anymore. I believe I've already fixed this in the past, but I'll have another look.

Wired203 commented 8 years ago

I had a thought on this, and if you can't find it and fix it there's another option. We can retrieve the health float so we could have a for each if health > maxhealth maxhealth = health per char object in the backround. This would allow it to auto adjust to the proper setting. I just don't know if there are any abilities that would increase max hps and would throw that completely off.

aevitas commented 8 years ago

There are various ways to obtain the maximum health for a character; through the mod stat cache, the actual field, and through a script call. Randomly, one of these works and the other two don't. It's most likely just a matter of finding out which one it is this time around - that'll fix HealthPercent as well.

Wired203 commented 8 years ago

Awesome, then I can finish the implementation of Pures targeting code which will increase accuracy of targeting and not pickup random people anymore. There's a lot of people excited for this.

Date: Mon, 21 Mar 2016 08:51:58 -0700 From: notifications@github.com To: BuddyWing@noreply.github.com CC: wired203@hotmail.com Subject: Re: [BuddyWing] MaxHealth not always returning a value (#25)

There are various ways to obtain the maximum health for a character; through the mod stat cache, the actual field, and through a script call. Randomly, one of these works and the other two don't. It's most likely just a matter of finding out which one it is this time around - that'll fix HealthPercent as well.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

aevitas commented 8 years ago

Fixed, should now display the maximum health for other characters and players as well.