Rematch 5.0

Discuss your favorite pet addons and macros.
User avatar
Justgiz
Posts:28
Joined:December 30th, 2018
Pet Score:14236
Realm:Alterac Mountains-us
Contact:
Re: Rematch 5.0

Post by Justgiz » August 23rd, 2023, 7:30 pm

New error found. No idea what's causing it. I've tried multiple things. Disabled all my addons, Relaunched the game client. Even redownloaded Beta-11 incase I accidently edited something. And to get this error, all I have to do is: /reload.

Code: Select all

11x [string "*notes.xml:259_OnSizeChanged"]:1: attempt to call method 'OnSizeChanged' (a nil value)
[string "*notes.xml:259_OnSizeChanged"]:1: in function <[string "*notes.xml:259_OnSizeChanged"]:1>

Locals:
self = RematchNotesCard {
 0 = <userdata>
 Content = Frame {
 }
 Bottom = Texture {
 }
 CloseButton = Button {
 }
 Right = Texture {
 }
 Left = Texture {
 }
 Title = FontString {
 }
 Top = Texture {
 }
 BottomRight = Texture {
 }
 TopRight = Texture {
 }
 TopTileStreaks = Texture {
 }
 LockButton = Button {
 }
 TopLeft = Texture {
 }
 Bg = Texture {
 }
 BottomLeft = Texture {
 }
}
w = 700.000061
h = 395
(*temporary) = nil
(*temporary) = RematchNotesCard {
 0 = <userdata>
 Content = Frame {
 }
 Bottom = Texture {
 }
 CloseButton = Button {
 }
 Right = Texture {
 }
 Left = Texture {
 }
 Title = FontString {
 }
 Top = Texture {
 }
 BottomRight = Texture {
 }
 TopRight = Texture {
 }
 TopTileStreaks = Texture {
 }
 LockButton = Button {
 }
 TopLeft = Texture {
 }
 Bg = Texture {
 }
 BottomLeft = Texture {
 }
}
(*temporary) = 700.000061
(*temporary) = 395
(*temporary) = "attempt to call method 'OnSizeChanged' (a nil value)"
edit: this only happens on a reload. not an initial loading of the game/logging in

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

Re: Rematch 5.0

Post by Gello » August 24th, 2023, 2:26 am

Justgiz wrote:
August 23rd, 2023, 7:30 pm

Code: Select all

11x [string "*notes.xml:259_OnSizeChanged"]:1: attempt to call method 'OnSizeChanged' (a nil value)
[string "*notes.xml:259_OnSizeChanged"]:1: in function <[string "*notes.xml:259_OnSizeChanged"]:1>
edit: this only happens on a reload. not an initial loading of the game/logging in
This is an interesting one. After a /reload and you've gotten that error, can you enter this in chat:

Code: Select all

/dump Rematch.notes.OnSizeChanged
It should return:

Code: Select all

Dump: value=Rematch.notes.OnSizeChanged
[1]=<function>
If it returns this, then something is more seriously wrong:

Code: Select all

Dump: value=Rematch.notes.OnSizeChanged
empty result
(edit: It's just occurred to me that if there's an error in the xml that the lua may not load so you may get 'empty results' regardless. Try the following still to see if it works if you're comfortable editing the files.)

If you do get [1]=<function>, it seems that OnSizeChanged is being called when the frame is created, much like OnLoad. It sounds like you're comfortable editing these files so if you'd like to try, go into notes.xml and at near the very end there's this bit:

Code: Select all

            <OnSizeChanged>
                self:OnSizeChanged(w,h)
            </OnSizeChanged>
Delete those three lines, save notes.xml and then open notes.lua and add the OnSizeChanged line below to notes.lua just after the PLAYER_LOGIN bit:

Code: Select all

rematch.events:Register(rematch.notes,"PLAYER_LOGIN",function(self)

    self:SetScript("OnSizeChanged",self.OnSizeChanged)
Save and /reload if you're already in the game. This should prevent that error. Check to confirm that the notes' text wrap properly before you move/resize it. (If something was happening that wanted to resize the frame, it's possible that the initial size may be weird. If so, that can be fixed.) Then see if you can move/resize it like normal and that the text properly adjusts as you resize.

edit2: This is the only place where <OnSizeChanged> is defined in the XML. I've moved it to the PLAYER_LOGIN for the next update.

User avatar
Justgiz
Posts:28
Joined:December 30th, 2018
Pet Score:14236
Realm:Alterac Mountains-us
Contact:

Re: Rematch 5.0

Post by Justgiz » August 24th, 2023, 11:37 am

What the heck! I cant get the bug to trigger anymore. No changes were made. I'm dumbfounded. It was intersting that the bug did start up randomly, and the fact that it kept happening after a full client relaunch. Weird.

I guess Ill keep you informed if it starts happening again, and ill try those things.

User avatar
Justgiz
Posts:28
Joined:December 30th, 2018
Pet Score:14236
Realm:Alterac Mountains-us
Contact:

Re: Rematch 5.0

Post by Justgiz » August 28th, 2023, 8:17 pm

I have a bit of a feature request, or at least a question. How do you feel about adding support for soft target interaction alongside mouseover. It came along in Dragonflight with action targeting. If you're not aware if it, allows you to interact with things in front of and with CVars, around the player. Soft targeting is also useful for melee DPS not having to tab target, and only targeting mobs in front of the player.

How can this be useful for Rematch? Quicker loading of teams for a target of course! The moment you're in range of them, the soft target changes and loads the team. I'm so used to pressing my 'interact with target' keybind, that I end up in a battle with the wrong team.

In all honesty :? I've been using it for a while now. I just copied and modified the mouseover "rematch.interact" callback function, swapping in the unit 'softinteract' and registering the 'PLAYER_SOFT_INTERACT_CHANGED' event right under where the mouseover ones are registered. It's so great ;)

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

Re: Rematch 5.0

Post by Gello » August 30th, 2023, 4:12 am

Justgiz wrote:
August 28th, 2023, 8:17 pm
How do you feel about adding support for soft target interaction alongside mouseover.
This is a really good idea thanks. Rather than add a third interact dropdown I may make one be interact mode and other interact behavior. We'll see.

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

Re: Rematch 5.0

Post by Gello » September 4th, 2023, 6:26 pm

A new beta was posted tonight. Changes are below. A few notes:
  • The beta update is "post dated" to 10.1.7 so you may need to load out of date addons until patch this week if it's not already.
  • As mentioned below, the soft interact option is hidden unless SoftTargetInteract cvar is 3. I may simply make it disabled, or allow 1 (controller) and 2 (keyboard/mouse), but I'm defaulting to hiding it to minimize expectations of support where most of the support would be on Blizzard's implementation for those who don't already use it.
  • The 'Always Interact' + 'Prefer Uninjured Teams' options will not automatically revert to a most-preferred team for a target when pets are healed (or a less injured one when leaving battle). Simply interacting with the target again should give an option of swapping teams if it's wanted.
09/04/2023 version 5.0.0-beta-12
  • Restored Team Options 'Load Healthiest Pet' and its suboptions 'Allow Any Version' and 'After Battles Or Heals Too' (latter was previously 'After Pet Battles Too')
  • Casting Revive Battle Pets or using a Battle Pet Bandage will potentially slot new pets from the leveling queue if the Leveling Queue Option 'Prefer Living Pets' is enabled and a leveling pet was skipped due to being dead or injured
  • Interact Option 'Prefer Uninjured Teams' will check for 'Load Healthiest Pet' option also and choose the topmost team that can be loaded at full health
  • When Interact Option 'Always Interact' is enabled and the loaded team is different than the current preferred team for the target (due to healing pets with 'Prefer Uninjured Teams' enabled or raising another team to top preferred team), interacting with the same target will re-trigger the chosen interact behavior, if any
  • Loading a team with an invalid pet (caged, released, petID reassignment) will automatically find a replacement
  • Behavior Option 'Preferred Window' has been "baked in" so that some behaviors that summon the window will return to the last used window (eg. if you were in journal last, it will summon the journal)
  • Added Interact Option 'On Soft Interact' if the SoftTargetInteract cvar is fully enabled (3) on login
  • Added cache for petIDs by speciesIDs to speed up internal search for alternate pets
  • Moved notes OnSizeChanged to a little later in the login
  • Updated toc for 10.1.7 patch

Mutanis
Posts:3
Joined:December 2nd, 2016
Pet Score:10293
Realm:Mannoroth-eu
Contact:

Re: Rematch 5.0

Post by Mutanis » September 10th, 2023, 6:10 am

I got an error. To reproduce: Rematch --> Targets --> Kalimdor --> Cassandra Kaboom --> hover the first pet ("Gizmo")

Code: Select all

Message: Interface/AddOns/Rematch/cards/petCard.lua:234: Usage: GetAbilityInfoByID(abilityID)
Time: Sun Sep 10 12:36:45 2023
Count: 3
Stack: Interface/AddOns/Rematch/cards/petCard.lua:234: Usage: GetAbilityInfoByID(abilityID)
[string "=[C]"]: in function `GetAbilityInfoByID'
[string "@Interface/AddOns/Rematch/cards/petCard.lua"]:234: in function `Update'
[string "@Interface/AddOns/Rematch/cards/petCard.lua"]:75: in function `update'
[string "@Interface/AddOns/Rematch/cards/cardManager.lua"]:126: in function `func'
[string "@Interface/AddOns/Rematch/utils/timer.lua"]:56: in function <Interface/AddOns/Rematch/utils/timer.lua:46>

Locals: (*temporary) = nil
Beside that, it looks pretty good :)

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

Re: Rematch 5.0

Post by Gello » September 10th, 2023, 6:37 am

Mutanis wrote:
September 10th, 2023, 6:10 am
I got an error. To reproduce: Rematch --> Targets --> Kalimdor --> Cassandra Kaboom --> hover the first pet ("Gizmo")
Thanks! I see the reason (Gizmo's abilities are shifted over a slot) and will have a fix in next update.

User avatar
FuxieDK
Posts:881
Joined:July 27th, 2009
Pet Score:14132
BattleTag®:FuxieDK#2678
Realm:Draenor-eu
Contact:

Re: Rematch 5.0

Post by FuxieDK » September 11th, 2023, 1:28 pm

Hey Gello,

Can you (re)release a new Beta, please?

The latest v4 release superseeds the latest v5 beta, and since v5-beta ruined v4-setup, it's kinda annoying that I can't just "Update all" in curseforge.

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

Re: Rematch 5.0

Post by Gello » September 11th, 2023, 2:01 pm

Oops yep, I can upload an update tonight.

edit: 5.0.0-beta-14 posted

Kentaris
Posts:2
Joined:June 3rd, 2018
Pet Score:6937
Realm:Aggramar-us
Contact:

Re: Rematch 5.0

Post by Kentaris » September 16th, 2023, 3:08 pm

Am I the only person who is running into an error with rematch and pet battle scripts? I've tried just about everything i can think of. Uninstalled, deleted saved variables, deleted other addons. Nothing i'm doing seems to be working. This is the error i'm getting.

11x tdBattlePetScript/Rematch/UI.lua:53: attempt to call method 'GetMenu' (a nil value)
[string "@tdBattlePetScript/Rematch/UI.lua"]:53: in function <tdBattlePetScript/Rematch/UI.lua:52>
[string "=[C]"]: ?
[string "@Decursive/Libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <Decursive/Libs/AceAddon-3.0/AceAddon-3.0.lua:61>
[string "@Decursive/Libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:523: in function <Decursive/Libs/AceAddon-3.0/AceAddon-3.0.lua:516>
[string "=(tail call)"]: ?
[string "@tdBattlePetScript/Core/Manager/PluginManager.lua"]:149: in function `LoadPlugins'
[string "@tdBattlePetScript/Core/Manager/PluginManager.lua"]:33: in function <...Ons/tdBattlePetScript/Core/Manager/PluginManager.lua:32>

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

Re: Rematch 5.0

Post by Gello » September 16th, 2023, 4:53 pm

Kentaris wrote:
September 16th, 2023, 3:08 pm
Am I the only person who is running into an error with rematch and pet battle scripts?
I'm not involved in the battle scripts project, but as far as I'm aware there's still some work to be done before it's compatible with the Rematch 5 beta.

Part of that work is waiting for me to implement events for team conversions which should go up this weekend but it'll likely be some time still.

Kentaris
Posts:2
Joined:June 3rd, 2018
Pet Score:6937
Realm:Aggramar-us
Contact:

Re: Rematch 5.0

Post by Kentaris » September 16th, 2023, 8:18 pm

thanks for the reply. Trying to find information has been a bit difficult. Which you wouldn't figure would be the case with the internet but oh well.

User avatar
Justgiz
Posts:28
Joined:December 30th, 2018
Pet Score:14236
Realm:Alterac Mountains-us
Contact:

Re: Rematch 5.0

Post by Justgiz » September 26th, 2023, 7:58 pm

First, thanks for the new REMATCH_TEAMS_CONVERTED event. Helps tremendously.

But I'm a little confused on the arguments for REMATCH_TEAM_OVERWRITTEN. I've looked at how the code is executed, and I believe I found 4 scenarios:
  • String import, teamID is overwritten, no oldTeamID is passed
  • Edit existing team (context menu), teamID is overwritten, oldTeamID is deleted.
  • Saving a new team is, no teamID, oldTeamID is being overwritten.
  • Click save-as with team loaded, teamID is passed, but isnt being touched. oldTeamID is overwritten.
Is that correct? Those all seem to be inconstant with each other.

I also noticed that both REMATCH_TEAM_DELETED and REMATCH_TEAM_UPDATED will trigger due to those changes.

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

Re: Rematch 5.0

Post by Gello » September 29th, 2023, 3:46 am

Sorry for late response.

I think you're correct there is an inconsistency with REMATCH_TEAM_OVERWRITTEN, specifically when the single-team save dialog is involved (which can be editing an existing team or saving a new team). In the next update, the teamID that's being overwritten will always be the first argument and (if applicable) the teamID that it's being overwritten with as the second one.

Code: Select all

MultiTeam Conflict Overwrite Edit NewTeamID OldTeamIDUsed OldTeamIDDeleted
    N        N                        Y
    N        Y        N               Y
    N        Y        Y        N      N          Y              N
    N        Y        Y        Y      N          N              Y
    Y        N                        Y
    Y        Y        N               Y
    Y        Y        Y               N          Y              N
Some events are fired from the "sideline" which is a staging metatable for making changes to teams. So there will be times when multiple events are fired.

REMATCH_TEAM_CREATED (arg1=teamID created) when NewTeamID is 'Y'
REMATCH_TEAM_DELETED (arg1=teamID deleted) when OldTeamIDDeleted is 'Y'
REMATCH_TEAM_UPDATED (arg1=teamID updated) when OldTeamIDUsed is 'Y'
REMATCH_TEAM_OVERWRITTEN (arg1=teamID being overwritten, arg2=teamID that's replacing arg1) when Overwrite is 'Y'

As an aside, it's possible for arg2 to be nil for cases like Save As with no team loaded. (I'll double check that special non-user teams like "counter" are never passed as arg2.)

The REMATCH_TEAM_OVERWRITTEN arg1 now (in 5.0.0-beta-16) has the teamID being overwritten as the second argument when MultiTeam is N and Overwrite is Y. Version 5.0.0-beta-17 onward will have the teamID being overwritten as the first argument.

I don't know if I'll have an update to post this weekend, but if you'd like to make that change on your local copy for now, it's in dialogs/savedDialog.lua line 138:

Code: Select all

rematch.events:Fire("REMATCH_TEAM_OVERWRITTEN",subject.overwriteID,subject.teamID)
edit: The update being posted this morning (5.0.0-beta-17) has the above change.

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

Re: Rematch 5.0

Post by Gello » October 9th, 2023, 9:36 am

As a status, these are the things I'm aiming to complete before this leaves beta:
  • Send/Receive teams across backchannel (CHAT_MSG_ADDON)
  • Improve way of pulling up targets for teams (possibly Edit Target menu on team list)
  • Verify for 10.2 (some model change it seems); also update Rematch 4 for 10.2
  • Review autoscrollframe, possibly use new artwork/code from 10.1
  • Pet Herder (like Team Herder) to single-click favorite, cage, add to leveling queue or pet marker pets in pet list
  • Review need for more tooltips
  • Add UI sounds
  • Set up more rigorous regression tests (automate where able)
I was targeting this month, but work has taken up a lot of my time lately so it will likely slip into November. If so, I'll try to release it to coincide with the 10.2 patch if it's ready. (Making sure Rematch 4 is ready for patch day is a priority also in case anyone wants to switch back after initial release.)

How is the Pet Battle Scripts project support for Rematch 5 going? More time needed? Ready anytime? I will give a couple weeks warning on this forum before this goes live. (I'm open to other channels to make that announcement too.)

Schlumpf
Posts:21
Joined:December 21st, 2019
Pet Score:11085
Realm:Antonidas-eu
Contact:

Re: Rematch 5.0

Post by Schlumpf » October 15th, 2023, 7:27 am

Gello wrote:
October 9th, 2023, 9:36 am
How is the Pet Battle Scripts project support for Rematch 5 going? More time needed? Ready anytime? I will give a couple weeks warning on this forum before this goes live. (I'm open to other channels to make that announcement too.)
I've been massively lacking in energy, so sadly no progress from me. @Justgiz has done a version apparently but I didn't have a look at it to be honest. Based on their comments, it seems to not have Rematch 4 compatibility, which I'd personally prefer to have. I'll try to get some head space to have a look and add backwards compatibility to their branch. There are some todos commented in the diff, so I guess it needs a fee more thoughts.

Don't hold back your great work because of us slacking though. Worst case I'll just merge Gizz's changes without looking ;)

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

Re: Rematch 5.0

Post by Gello » October 15th, 2023, 12:26 pm

No worries at all. Thanks for the update. I'll do my best to give at least a couple weeks notice before it leaves beta. Let me know if I can help from my end.

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

Re: Rematch 5.0

Post by Gello » October 16th, 2023, 4:01 pm

It looks like 10.2 goes live on November 7th. Unless any big issues or surprises, I'll target for this date for Rematch 5 going live.

User avatar
Mtdagny
Posts:1
Joined:June 8th, 2015
Pet Score:13089
Realm:Stormrage-us
Contact:

Re: Rematch 5.0

Post by Mtdagny » October 16th, 2023, 6:12 pm

Just tried beta. Everything smooth and easy... nothing of mine lost that I noted (only done about 6 pet battles). But get these lua errors when I initiate a battle without a rematch string. -- If it makes a difference was in kul tiras for the battle (so older content).
Attachments
petmatch lua.png
petmatch lua.png (69KiB)Viewed 100570 times

Post Reply