Rematch 4.0

Discuss your favorite pet addons and macros.
User avatar
Aranesh
Posts:98
Joined:August 28th, 2015
Pet Score:11557
Realm:Lothar-eu
Contact:
Re: Rematch 4.0

Post by Aranesh » November 13th, 2015, 5:21 am

That looks pretty sweet! Although it means more strings to translate I guess ;-)
Haven't forgotten about it. It took me way longer than I hoped to translate, but I should be able to finalize the current version today or tomorrow. I'll post the file here if that's okay with you?

Gello
Posts:579
Joined:January 23rd, 2014
Pet Score:9171
Realm:Hyjal-us
Contact:

Re: Rematch 4.0

Post by Gello » November 13th, 2015, 6:28 am

Aranesh wrote:That looks pretty sweet! Although it means more strings to translate I guess ;-)
Haven't forgotten about it. It took me way longer than I hoped to translate, but I should be able to finalize the current version today or tomorrow. I'll post the file here if that's okay with you?
Awesome! I look forward to it. And there's no rush at all.

You may have already noticed, but if not, the Changelog.lua file has new strings that each update adds/removes. To help track what new strings are added.

And you can post it here or via dropbox or whatever you'd like. If you'd like to email them (I'm hoping there will be updates as future strings get added :D) I'm sending you my email address via PM on this site.

Thanks!

User avatar
Aranesh
Posts:98
Joined:August 28th, 2015
Pet Score:11557
Realm:Lothar-eu
Contact:

Re: Rematch 4.0

Post by Aranesh » November 13th, 2015, 10:25 am

I noticed the changelog, yes :D Definitely helpful for the future! The file I'm working on should be the current version on curse.

*EDIT* You already PMed me ^^ I'll mail you the translated file asap!

User avatar
Iibis
Posts:154
Joined:October 21st, 2013
Pet Score:4297
Realm:Emerald Dream-eu
Contact:

Re: Rematch 4.0

Post by Iibis » November 14th, 2015, 11:54 am

One thing I've been thinking about. Does Rematch take xp buffs into consideration when it checks for max level? I have different buffs at different times so it would be great if we set the limit e.g. to unbuffed max level but then Rematch takes different buffs into account. I don't know what the best way to calculate, and make it automatic, would be though. :)

Gello
Posts:579
Joined:January 23rd, 2014
Pet Score:9171
Realm:Hyjal-us
Contact:

Re: Rematch 4.0

Post by Gello » November 14th, 2015, 12:59 pm

Iibis wrote:One thing I've been thinking about. Does Rematch take xp buffs into consideration when it checks for max level? I have different buffs at different times so it would be great if we set the limit e.g. to unbuffed max level but then Rematch takes different buffs into account. I don't know what the best way to calculate, and make it automatic, would be though. :)
At the moment it doesn't. There's some discussion on the curse comments about it recently.

The calculations would involve storing the coefficients for all noteworthy targets, begin tracking buffs and their effects, and it'd require affected teams to have that specific target saved within them so it can plug in the stored numbers. It can't predict how much xp a pet would get if it doesn't know what it's about to fight. So it would not work for wild battles because the level of opponent varies and it can't know what you're about to fight before the fight.

It's something I'll look into more once we know more about potential changes in Legion. It's rather complicated to implement.

User avatar
Jerebear
Posts:1243
Joined:September 15th, 2013
Pet Score:13569
Realm:Llane-us
Contact:

Re: Rematch 4.0

Post by Jerebear » November 14th, 2015, 3:07 pm

Gello wrote:
Iibis wrote:One thing I've been thinking about. Does Rematch take xp buffs into consideration when it checks for max level? I have different buffs at different times so it would be great if we set the limit e.g. to unbuffed max level but then Rematch takes different buffs into account. I don't know what the best way to calculate, and make it automatic, would be though. :)
At the moment it doesn't. There's some discussion on the curse comments about it recently.

The calculations would involve storing the coefficients for all noteworthy targets, begin tracking buffs and their effects, and it'd require affected teams to have that specific target saved within them so it can plug in the stored numbers. It can't predict how much xp a pet would get if it doesn't know what it's about to fight. So it would not work for wild battles because the level of opponent varies and it can't know what you're about to fight before the fight.

It's something I'll look into more once we know more about potential changes in Legion. It's rather complicated to implement.
One thing to consider:
You don't necessarily have to approach it like that. When a player inputs a max level into the team preferences, they are doing so with an *implicit* tamer coefficient in mind. They know the max level pet that particular target can handle. Additionally the amount of EXP needed to gain the current level and the next level is known (see Pet Experience Chart at http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829 ).

You could add an option to make the max level a "raw" data point, then calculate how the buffs would adjust that max level. For example, say someone sets a tamer max level to be 23.5:
1. From the table that means the last 1980 + 0.5*1920 = 2940 EXP.
2. Assuming Safari Hat and Battle Pet event buff, that moves us to 2940*3.1 = 9114 EXP from max
3. This places the new level at 23885 - 9114 = 14771 EXP
4. New base level (via binary searched table lookup) is 20 (which starts at 14730).
5. 14771-14730 = 41 EXP over level 20
6. There is 1595 EXP between 20 and 21 so, 41/1595 = 0.02570532915360501567398119122257
7. So final answer is either 20.02 or 20.03 depending on how you wanted to decide to round it (safe vs by the rules).

You would basically need to keep the table of EXP to get to a level and the table of EXP between levels (the two columns in my chart linked above). Then binary or linearly search (You know the starting level and are only moving one direction, so a linear my not be t0o costly).

I don't know if that is the right way to go or not, but something to consider. Possibly less costly than keeping up with all the tamers.
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829

Gello
Posts:579
Joined:January 23rd, 2014
Pet Score:9171
Realm:Hyjal-us
Contact:

Re: Rematch 4.0

Post by Gello » November 14th, 2015, 4:09 pm

Jerebear wrote:One thing to consider:
You don't necessarily have to approach it like that. When a player inputs a max level into the team preferences, they are doing so with an *implicit* tamer coefficient in mind. They know the max level pet that particular target can handle. Additionally the amount of EXP needed to gain the current level and the next level is known (see Pet Experience Chart at http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829 ).

You could add an option to make the max level a "raw" data point, then calculate how the buffs would adjust that max level. For example, say someone sets a tamer max level to be 23.5:
1. From the table that means the last 1980 + 0.5*1920 = 2940 EXP.
2. Assuming Safari Hat and Battle Pet event buff, that moves us to 2940*3.1 = 9114 EXP from max
3. This places the new level at 23885 - 9114 = 14771 EXP
4. New base level (via binary searched table lookup) is 20 (which starts at 14730).
5. 14771-14730 = 41 EXP over level 20
6. There is 1595 EXP between 20 and 21 so, 41/1595 = 0.02570532915360501567398119122257
7. So final answer is either 20.02 or 20.03 depending on how you wanted to decide to round it (safe vs by the rules).

You would basically need to keep the table of EXP to get to a level and the table of EXP between levels (the two columns in my chart linked above). Then binary or linearly search (You know the starting level and are only moving one direction, so a linear my not be t0o costly).

I don't know if that is the right way to go or not, but something to consider. Possibly less costly than keeping up with all the tamers.
That's very clever. It would no longer be tied to the target/teams, so it'd work for wild battles, it'd require no maintenance when they add new tamers, and the experience table would take up less space/maintenance than the formula numbers for each target. I really like this, thanks for posting it! I'll see what we can do with it.

User avatar
Jerebear
Posts:1243
Joined:September 15th, 2013
Pet Score:13569
Realm:Llane-us
Contact:

Re: Rematch 4.0

Post by Jerebear » November 14th, 2015, 7:48 pm

I just glanced over the discussion at curse. I think doing something like this would meet the person's requirements. They could set it to descending and then set it so the max level accounts for buffs and it would pick the pets closes to 25 that wouldn't waste EXP.

Earlier I said the option was something like "raw", but realistically, I guess it could just be an option to "Account for Buffs". The only thing I don't know is if it is better to have that option set locally to the team or globally to the addon. I am leaning towards globally. I am not sure I could come up with a scenario where I only want specific teams to account for buffs and not others. Conversely, I can think of many scenarios where I would want all of my teams to at least temporarily account for buffs.

There are 5 primary exp buffs in wow:
Safari Hat
Pet Treat
Lesser Pet Treat
Darkmoon Top Hat
Sign of the Critter (the event bonus buff)

All have "Aura #420" as an effect (that's the bonus pet experience effect).

Would you have to keep track of the buffs by hand, or are you able to get the modifier in a more global way from the API?
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829

Gello
Posts:579
Joined:January 23rd, 2014
Pet Score:9171
Realm:Hyjal-us
Contact:

Re: Rematch 4.0

Post by Gello » November 15th, 2015, 1:22 am

Yeah globally sounds like the better option. Perhaps in the queue menu "Adjust Max Level With Buffs" or something with a tooltip to explain that turning it on will adjust the max level preference based on buffs.

Tracking buffs won't be a problem. I'll do some profile tests to find the fastest way but checking for the existence of those buffs by spellID when it refreshes the queue (and a max level preference is active) is probably the fastest.

edit: There is one scenerio where a max level wouldn't want to be adjusted along with others. For tamers that can level a level 1 pet (Ashlei, Thundering Pandaren Spirit, Mo'ruk, etc) I set a max level of 5 so it'd prefer low level pets before choosing the top-most pet in the queue. But I'll probably still go with global. At worst, a checkbox can be added to the individual teams "Don't Adjust Levels" or something.

User avatar
Jerebear
Posts:1243
Joined:September 15th, 2013
Pet Score:13569
Realm:Llane-us
Contact:

Re: Rematch 4.0

Post by Jerebear » November 15th, 2015, 11:33 am

Gello wrote:Tracking buffs won't be a problem. I'll do some profile tests to find the fastest way but checking for the existence of those buffs by spellID when it refreshes the queue (and a max level preference is active) is probably the fastest.
One scenario where that may not work (based on how I understand your statement):

I generally go to the tamer, click on it to load the team and carry pet, accept the quest, click on the tamer to get the chat bubble, and then pop my buffs so that I get every second of them. If it only updates when the queue updates, then I would incorrectly use the wrong modifier when I started the battle.

I don't know if there is an easy/good way to solve that though.
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829

User avatar
Darolyn
Posts:496
Joined:October 16th, 2011
Pet Score:5488
BattleTag®:Thaliana#1794
Realm:Kael'thas-us
Contact:

Re: Rematch 4.0

Post by Darolyn » November 15th, 2015, 4:07 pm

Is there a way to add EVERY non-25 to the queue? I mean every single one. No matter how many I have, if I have a 25, or whatever, is there a way to add them ALL with the push of a button?

Or do I have to manually add the duplicates?

Thanks!
Thaliana#1794 - My WoW account has 50 toons, so I would so greatly appreciate people creating toons on Kael'Thas or Ghostlands to trade with me. <3

Gello
Posts:579
Joined:January 23rd, 2014
Pet Score:9171
Realm:Hyjal-us
Contact:

Re: Rematch 4.0

Post by Gello » November 15th, 2015, 5:40 pm

Jerebear wrote:One scenario where that may not work (based on how I understand your statement):

I generally go to the tamer, click on it to load the team and carry pet, accept the quest, click on the tamer to get the chat bubble, and then pop my buffs so that I get every second of them. If it only updates when the queue updates, then I would incorrectly use the wrong modifier when I started the battle.

I don't know if there is an easy/good way to solve that though.
Hmm that would get kind of messy. I don't want this addon being so involved with buffs that it accumulates cpu time scrutinizing buffs when you're not doing pet battles. Maybe for a minute after a team loads it can watch buffs change and then shut its tracking off. I'll think on this.
Darolyn wrote:Is there a way to add EVERY non-25 to the queue? I mean every single one. No matter how many I have, if I have a 25, or whatever, is there a way to add them ALL with the push of a button?

Or do I have to manually add the duplicates?

Thanks!
Search "level<25" and filter pets to "Other->Not Leveling" and then from the queue menu choose "Fill Queue More". Then reset filter and repeat 1-2 more times until all pets under 25 are in the queue.

I don't generally recommend this but you can if you want!

User avatar
Darolyn
Posts:496
Joined:October 16th, 2011
Pet Score:5488
BattleTag®:Thaliana#1794
Realm:Kael'thas-us
Contact:

Re: Rematch 4.0

Post by Darolyn » November 15th, 2015, 6:19 pm

Thanks! I'm just trying to see how many I can get through on Squirt day. ;)
Thaliana#1794 - My WoW account has 50 toons, so I would so greatly appreciate people creating toons on Kael'Thas or Ghostlands to trade with me. <3

User avatar
Painbow
Posts:79
Joined:February 14th, 2015
Pet Score:10044
Realm:Mal'Ganis-us
Contact:

Re: Rematch 4.0

Post by Painbow » November 20th, 2015, 1:32 pm

I apologize if someone already reported this as a bug or if it's known:

If I export a team with its notes and preferences, the preferences are copied over but they don't actually work. If the export had, for example, 500 minimum health and a maximum level of 20 but nothing in the other fields, those fields will have the number 0 in them. I have to press "X" on each field to clear them all and readd all the preferences for them to actually work.

So as of right now, exporting with preferences selected is useless.

If this is known or if you would like video of this happening, let me know.

Gello
Posts:579
Joined:January 23rd, 2014
Pet Score:9171
Realm:Hyjal-us
Contact:

Re: Rematch 4.0

Post by Gello » November 20th, 2015, 2:32 pm

Painbow wrote:I apologize if someone already reported this as a bug or if it's known:

If I export a team with its notes and preferences, the preferences are copied over but they don't actually work. If the export had, for example, 500 minimum health and a maximum level of 20 but nothing in the other fields, those fields will have the number 0 in them. I have to press "X" on each field to clear them all and readd all the preferences for them to actually work.

So as of right now, exporting with preferences selected is useless.

If this is known or if you would like video of this happening, let me know.
Thanks for bringing it up. That is definitely a bug for the 0s to stay in those fields. This would affect sending teams to others too. I'll have a fix in the next update probably in the middle of next week.

In the meantime if you export teams as plain text the preferences seem to import okay.

User avatar
Painbow
Posts:79
Joined:February 14th, 2015
Pet Score:10044
Realm:Mal'Ganis-us
Contact:

Re: Rematch 4.0

Post by Painbow » November 20th, 2015, 3:02 pm

Okay! I didn't try exporting as plain text. Thanks for your quick response. Have a nice weekend. =D

User avatar
Painbow
Posts:79
Joined:February 14th, 2015
Pet Score:10044
Realm:Mal'Ganis-us
Contact:

Re: Rematch 4.0

Post by Painbow » November 20th, 2015, 4:05 pm

Gello wrote:
Painbow wrote:I apologize if someone already reported this as a bug or if it's known:

If I export a team with its notes and preferences, the preferences are copied over but they don't actually work. If the export had, for example, 500 minimum health and a maximum level of 20 but nothing in the other fields, those fields will have the number 0 in them. I have to press "X" on each field to clear them all and readd all the preferences for them to actually work.

So as of right now, exporting with preferences selected is useless.

If this is known or if you would like video of this happening, let me know.
Thanks for bringing it up. That is definitely a bug for the 0s to stay in those fields. This would affect sending teams to others too. I'll have a fix in the next update probably in the middle of next week.

In the meantime if you export teams as plain text the preferences seem to import okay.
It seems you can only export as plain text/string if you do one team at a time. Doesn't seem to have the option if exporting an entire tab. Is it possible to do? I only ask because I have a lot of teams saved and have been exporting them to other accounts lately, so exporting the entire tab is much easier, but seems to be string only.

User avatar
Iibis
Posts:154
Joined:October 21st, 2013
Pet Score:4297
Realm:Emerald Dream-eu
Contact:

Re: Rematch 4.0

Post by Iibis » November 20th, 2015, 4:23 pm

I just noticed a small "inconsistency" or maybe it's just that I'd like them to be exactly the other way around... ;)

If I type something to the search box and then noticed that I have some filters on that are preventing me seeing the correct result, when I clear the filters with the x it also clears the search box (which I rather it did not). If I have something typed to the search box and then apply a filter from the favorite filters, it does not clear the search box. I don't really mind this that much, since the search box can be cleared with its own x, but the first part is something I repeatedly do ("damnit").

I think it's just because I don't categorize search as a filter so I always forget that it's sometimes treated that way?

I don't know how others feel about this?

Gello
Posts:579
Joined:January 23rd, 2014
Pet Score:9171
Realm:Hyjal-us
Contact:

Re: Rematch 4.0

Post by Gello » November 20th, 2015, 4:52 pm

Painbow wrote:It seems you can only export as plain text/string if you do one team at a time. Doesn't seem to have the option if exporting an entire tab. Is it possible to do? I only ask because I have a lot of teams saved and have been exporting them to other accounts lately, so exporting the entire tab is much easier, but seems to be string only.
You're correct you can only export/import plain text teams one at a time. The addon wouldn't know where notes ended for a team and a new team began in the free-form plain text format.

If you'd like a solution in the meantime, paste the following into [url]http://addon.bool.no/[/url] to create a small addon to fix the bug:

Code: Select all

-- temporary fix for imported remtch teams converting empty prefences to 0
local prefs = { "minHP", "allowMM", "expectedDD", "maxHP", "minXP", "maxXP" }
local f = CreateFrame("Frame")
f:SetScript("OnEvent",function()
  local share = RematchDialog and RematchDialog.Share
  if share then
    hooksecurefunc(share,"ConvertStringToSideline",function(self,text)
      local team = Rematch:GetSideline()
      for _,pref in ipairs(prefs) do
        if team[pref]==0 then
          team[pref] = nil
        end
      end
    end)
  end
end)
f:RegisterEvent("PLAYER_LOGIN")
If curious about the bug, and export/import string format in general, here's a team for Aki the Chosen:

Aki the Chosen:66741:1180:110:919:364:277:384:278:710:0:0:0:0:P:500:1:10:0:0:0:

The "Aki the Chosen:66741:1180:110:919:364:277:384:278:710:0:0:0:0:" portion describes the team itself:
66741 is the npcID
1180, 110, 919, 364 describe the first pet (Zandalari Kneebiter) and his abilities
277, 384, 278, 710 describe the second pet (Clockwork Gnome) and his abilities
0, 0, 0, 0 describe a leveling slot (empty of meaningful numbers)

After the third pet it looks for a P: field to say "preferences are after this" or a N: field to say "notes are after this".

"P:500:1:10:0:0:0:"

500 is the minimum health
1 says allow magic & mechanical pets
10 says expected damage is mechanical
0, 0, 0 say max health, min level, max level should be empty

The specific bug you've discovered is it's dutifully converting those 0 preferences to actual 0s instead of emptying them out. So you get teams that require a max level of 0 which would never happen.

The above code snippet goes in after a team is converted from a string and empties every preference that's a 0.

Thanks again for bringing this to my attention! Probably others have run into this bug and just shrugged it off (or not noticed since it'd just grab first pet in the queue instead of obeying preferences). This is kind of an obvious one that should've been caught earlier woops.

User avatar
Delis
Posts:15
Joined:December 16th, 2012
Pet Score:8891
Realm:Andorhal-us
Contact:

Re: Rematch 4.0

Post by Delis » November 20th, 2015, 5:04 pm

I have "Auto Load" set in the options and have noticed a little quirk. If I am in combat when I targeting the opponent the team does not load. I understand that it cannot load since I am in combat. However once I exit from combat and then re-target the opponent the team does not load since it thinks it has already loaded, but it did not. Is there a way you could not register the targeting of the opponent if you are in combat?

Thanks

Post Reply