If you have both PBT and Rematch enabled, go into Rematch's Teams button (next to the search box in the Teams tab) and choose "Import From Pet Battle Teams". It should import all of your PBT teams into Rematch.Pendabear wrote:I have been digging around but does anyone have a quick set up for people like me new to Rematch to just import all the tamer teams? Or do I need to set it up manually? I have been using Pet Battle Teams but want to try new things with Legion, don't mind setting them up again but not sure if there is a shortcut!
Rematch 4.0
Re: Rematch 4.0
Heh I had disabled them to load Rematch in case there was an error, I see it now... thank you!
Re: Rematch 4.0
This thread has been moved over to our newly created pet addon and macro forum! Have left a copy in original destination but please feel free to check out the new location and add anything you think may be useful
Re: Rematch 4.0
Sorry for this very long post. If you don't have time to read it, a TL;DR is:
- In the next update (4.5.0) later this week, the queue's control of leveling slots is changing. It will only control slots explicitly marked as leveling slots and no longer care about the nature of the pet in the slot.
- You will turn on/off a leveling slot from the battle pet slot's right-click menu.
- Rematch 5.0 will probably not happen for a few more months still.
If you do have time to read:
This is a heads up about some upcoming changes to the leveling queue and a general state-of-the-addon as we move into Legion. I'm posting this ahead of the update since it's past when I've wanted to post it and I know some are experiencing problems with the queue and are no doubt frustrated with its behavior in the pre-patch. Also with all the pre-patch madness it's taken more work than expected to get it done properly so it may be a few more days still.
Some background first: For as long as this addon has had a leveling queue, whether the queue controlled any of the three loadout slots was determined by which of the slotted pets were in the queue. If a queued pet was slotted, the queue assumed control of that slot. Saving a team with a queued pet translated that pet to a leveling pet. This worked well enough but it has gotten cumbersome with things added over time. Multiple leveling slots, manually slotted pets that the user doesn't want the queue to handle, the "superposition" role of saving leveling pets as themselves, etc. Other complications make it a bit of a nuisance to juggle. Like if a pet levels to 25 and leaves the queue, the queue has to keep its thumb on that pet before releasing it to swap in its replacement; or that manually slotting a pet that was already slotted will shuffle pets around; or that the queue had to stop completely when pets couldn't be swapped because it could get out of sync; or the "sanctuary" system to restore petIDs in the event of a server reassignment. All of these internal rules can be handled and for the most part it's done a decent job, but recent problems with the queue in the Legion pre-patch have shown there are problems and it can do its job better. I'm pleased to say all of the above will no longer be an issue soon.
Starting with the next update (4.5.0), whether the queue controls a slot is not determined by the pet in the slot (and other factors like being manually loaded or saved as itself), but instead by you choosing which slots are to act as leveling slots.
Turning on a leveling slot can be done in one of two ways:
- The right-click menu for the slot: "Put Leveling Pet Here"
- Loading a team with leveling slots saved.
Turning off a leveling slot can be done in one of four ways:
- The right-click menu for the slot: "Stop Leveling This Slot"
- Loading a team without leveling slots.
- Unloading the currently loaded team.
- Slotting any non-slotted pet.
Other changes:
- You can mark a slot as a leveling slot without having any pets in the queue. The gold border will turn silver to show it's "disabled" or waiting until there's queued pets to fill the slot.
- The queue will no longer be locked down while in battle, pvp or combat. You can manipulate the queue all you want. Pets will just not swap until you leave battle, pvp or combat.
- The "Save Without Leveling Slots" in the save dialog is being removed. If you want to save a queued pet in a team, just turn off the leveling slot.
- Dragging the top-most pet from the queue to a loadout slot will no longer mark that as a leveling slot. You need to right-click and "Put Leveling Pet Here".
Also:
- Any non-saved leveling slot designations will only remain until you load a new team, logout or /reload. To make the leveling slots "stick" you will need to save the team. These manual leveling slot designations are temporary unless you save them.
- Until Rematch 5.x, I will not be re-implement the "sanctuary" system that tracked the changing stats of pets in the queue in the event they are caged/relearned or the server does a petID reassignment. For those rare cases when a server petID reassignment does happen, the queue will be emptied. The very nature of the queue meant the pets' stats were frequently changing and the validation/tracking methods took up the lion's share of processing for an eventually that will never happen for the vast majority of users. With the improved methods of filling the queue, I feel it's not a catastrophe if the queue is emptied in the the extremely rare event of a petID reassignment. And this will be back in a much-improved form in Rematch 5.0.
The downside to these changes is that the queue may seem to be less able to predict what behavior you were after. Or it may require a few extra clicks to save leveling pets as themselves. Or you may need to "restart" a leveling slot if you had to logout or reload while you were out leveling on wide pets. My hope is that these inconveniences will be minor compared to the benefits of a much more reliable, flexible and predictable queue.
Also, unrelated to the queue, but an update on Rematch 5:
Some are aware I've been working on a major update of this addon over the past few months. 5.x will not be nearly as drastic a UI change as the 3.x to 4.x update was, but it's a dramatic improvement in the addon's design and extensibility.
The goals of 5.x are:
- Remove unnecessary fluff that's no longer relevant. Like the pullout "current leveling pet" slot and pullout loaded team bit are definitely going.
- "Flatten" the UI to make it more ammenable to skinning and reduce frame/texture use.
- Offload parts some users may never use to a load-on-demand module. This may include the collection stats, win records, import/export/sharing, the safari hat reminder thing, etc.
- Allow outside modules to add their own tabs and add their own stats to pet cards. Such as a separate module to track the battle success of all of your individual pets.
- Allow a single team to store multiple targets. So if you have one team you use for many tamers you don't need to save a copy for each tamer.
- A "team builder" mode that lets you build teams without actually owning the pets.
- No more sanctuary system. This may or may not require Rematch have its own breed module, but instead of recording stats it will attach only the breed with the teams and the leveling queue.
- And a very big goal, to make 5.0 have a smaller operational footprint than 4.5. While I'm pleased overall with 4.x's size given all it can do, getting rid of fluff and offloading stuff to load-on-demand will produce a more compact and efficient addon.
I've been having a blast working on it. I very much wanted to get it ready for Legion because its layout system is much, much better. But unfortunately it's not going to make it. Once Legion launches I'll be spending my free time playing WoW more than working on addons. More critically, as the weeks leading up to the pre-patch approached, I was copy-pasting 4.x code left and right to make the deadline and the old and new methods just aren't compatable and all the gimmicks to get it to work was definitely failing the major goals of 5.x. So...it's not completely back to the drawing board, but I'm going to make sure 5.x is done properly. All the 4.x code is being ripped out and I'm reverting back to code from May/June for a total rewrite. So it will definitely take a few more months still, especially with the expansion later this month.
So for those I've told I was unlikely to make major changes to 4.x to spend time on 5.x, I'm now shifting support focus back to 4.x and 5.x will be a work in progress with an ETA of later this year.
This post was much longer than I planned, sorry about that! If you have any questions feel free to ask.
- In the next update (4.5.0) later this week, the queue's control of leveling slots is changing. It will only control slots explicitly marked as leveling slots and no longer care about the nature of the pet in the slot.
- You will turn on/off a leveling slot from the battle pet slot's right-click menu.
- Rematch 5.0 will probably not happen for a few more months still.
If you do have time to read:
This is a heads up about some upcoming changes to the leveling queue and a general state-of-the-addon as we move into Legion. I'm posting this ahead of the update since it's past when I've wanted to post it and I know some are experiencing problems with the queue and are no doubt frustrated with its behavior in the pre-patch. Also with all the pre-patch madness it's taken more work than expected to get it done properly so it may be a few more days still.
Some background first: For as long as this addon has had a leveling queue, whether the queue controlled any of the three loadout slots was determined by which of the slotted pets were in the queue. If a queued pet was slotted, the queue assumed control of that slot. Saving a team with a queued pet translated that pet to a leveling pet. This worked well enough but it has gotten cumbersome with things added over time. Multiple leveling slots, manually slotted pets that the user doesn't want the queue to handle, the "superposition" role of saving leveling pets as themselves, etc. Other complications make it a bit of a nuisance to juggle. Like if a pet levels to 25 and leaves the queue, the queue has to keep its thumb on that pet before releasing it to swap in its replacement; or that manually slotting a pet that was already slotted will shuffle pets around; or that the queue had to stop completely when pets couldn't be swapped because it could get out of sync; or the "sanctuary" system to restore petIDs in the event of a server reassignment. All of these internal rules can be handled and for the most part it's done a decent job, but recent problems with the queue in the Legion pre-patch have shown there are problems and it can do its job better. I'm pleased to say all of the above will no longer be an issue soon.
Starting with the next update (4.5.0), whether the queue controls a slot is not determined by the pet in the slot (and other factors like being manually loaded or saved as itself), but instead by you choosing which slots are to act as leveling slots.
Turning on a leveling slot can be done in one of two ways:
- The right-click menu for the slot: "Put Leveling Pet Here"
- Loading a team with leveling slots saved.
Turning off a leveling slot can be done in one of four ways:
- The right-click menu for the slot: "Stop Leveling This Slot"
- Loading a team without leveling slots.
- Unloading the currently loaded team.
- Slotting any non-slotted pet.
Other changes:
- You can mark a slot as a leveling slot without having any pets in the queue. The gold border will turn silver to show it's "disabled" or waiting until there's queued pets to fill the slot.
- The queue will no longer be locked down while in battle, pvp or combat. You can manipulate the queue all you want. Pets will just not swap until you leave battle, pvp or combat.
- The "Save Without Leveling Slots" in the save dialog is being removed. If you want to save a queued pet in a team, just turn off the leveling slot.
- Dragging the top-most pet from the queue to a loadout slot will no longer mark that as a leveling slot. You need to right-click and "Put Leveling Pet Here".
Also:
- Any non-saved leveling slot designations will only remain until you load a new team, logout or /reload. To make the leveling slots "stick" you will need to save the team. These manual leveling slot designations are temporary unless you save them.
- Until Rematch 5.x, I will not be re-implement the "sanctuary" system that tracked the changing stats of pets in the queue in the event they are caged/relearned or the server does a petID reassignment. For those rare cases when a server petID reassignment does happen, the queue will be emptied. The very nature of the queue meant the pets' stats were frequently changing and the validation/tracking methods took up the lion's share of processing for an eventually that will never happen for the vast majority of users. With the improved methods of filling the queue, I feel it's not a catastrophe if the queue is emptied in the the extremely rare event of a petID reassignment. And this will be back in a much-improved form in Rematch 5.0.
The downside to these changes is that the queue may seem to be less able to predict what behavior you were after. Or it may require a few extra clicks to save leveling pets as themselves. Or you may need to "restart" a leveling slot if you had to logout or reload while you were out leveling on wide pets. My hope is that these inconveniences will be minor compared to the benefits of a much more reliable, flexible and predictable queue.
Also, unrelated to the queue, but an update on Rematch 5:
Some are aware I've been working on a major update of this addon over the past few months. 5.x will not be nearly as drastic a UI change as the 3.x to 4.x update was, but it's a dramatic improvement in the addon's design and extensibility.
The goals of 5.x are:
- Remove unnecessary fluff that's no longer relevant. Like the pullout "current leveling pet" slot and pullout loaded team bit are definitely going.
- "Flatten" the UI to make it more ammenable to skinning and reduce frame/texture use.
- Offload parts some users may never use to a load-on-demand module. This may include the collection stats, win records, import/export/sharing, the safari hat reminder thing, etc.
- Allow outside modules to add their own tabs and add their own stats to pet cards. Such as a separate module to track the battle success of all of your individual pets.
- Allow a single team to store multiple targets. So if you have one team you use for many tamers you don't need to save a copy for each tamer.
- A "team builder" mode that lets you build teams without actually owning the pets.
- No more sanctuary system. This may or may not require Rematch have its own breed module, but instead of recording stats it will attach only the breed with the teams and the leveling queue.
- And a very big goal, to make 5.0 have a smaller operational footprint than 4.5. While I'm pleased overall with 4.x's size given all it can do, getting rid of fluff and offloading stuff to load-on-demand will produce a more compact and efficient addon.
I've been having a blast working on it. I very much wanted to get it ready for Legion because its layout system is much, much better. But unfortunately it's not going to make it. Once Legion launches I'll be spending my free time playing WoW more than working on addons. More critically, as the weeks leading up to the pre-patch approached, I was copy-pasting 4.x code left and right to make the deadline and the old and new methods just aren't compatable and all the gimmicks to get it to work was definitely failing the major goals of 5.x. So...it's not completely back to the drawing board, but I'm going to make sure 5.x is done properly. All the 4.x code is being ripped out and I'm reverting back to code from May/June for a total rewrite. So it will definitely take a few more months still, especially with the expansion later this month.
So for those I've told I was unlikely to make major changes to 4.x to spend time on 5.x, I'm now shifting support focus back to 4.x and 5.x will be a work in progress with an ETA of later this year.
This post was much longer than I planned, sorry about that! If you have any questions feel free to ask.
Re: Rematch 4.0
That is one thing that I have not enjoyed with Blizzard, in the Pet Battle thing ... have you tried searching for a pet named "rat" at all? It includes all the dishes and moldy fruit in your fridge, and you're lucky to find a rat or two!Gráinne wrote:A few interim points. No malfunctions so far.
...
1. On Sort sequence, my sort sequence has always been
...
All in all, this is the reason why I like a spreadsheet, so I have an easier time looking/finding things. It doesn't help that I have a bad right eye (3 surgeries) and I already see double many times. Now you know why I usually/always heal in raids ... easier to keep track of one or two players only. (GuruGuru and Uduwudu are both raid healers)
Re: Rematch 4.0
Thanks ... and I have not, yet, tried this addon.Gello wrote: ...
This post was much longer than I planned, sorry about that! If you have any questions feel free to ask.
A couple of dumb questions ... why "slot" and not handling a pet individually? Would that not be simply adding to the code spaghetti?
Below is an example of what I did, off the spreadsheet from the petsear.ch website before it went down (this past week), and how I manicure the sheet now, by adding pets manually, and then taking them out when they reach Level 25. It would be nice, if it happened within the game itself, but not really necessary, I would think.
I will check your tool asap ... sounds nice and well thought out, although I'm not sure I need it for a lot more than just a listing of Pets that need upgrading in either level or type. I have not, as YET, made a list of "teams" for various fights all over the game, and I still check websites for ideas and Pets to use, with this website being my primary resource of choice, due to it being a bit more up to date than some other places, that still have information that is as old as dinosaurs, and as old as the original EQ!
http://www.warcraftpets.com/community/forum/viewtopic.php?f=2&t=15604&p=128100#p128100
Thanks for your posting. I enjoyed it and have not even looked at the tool!
Re: Rematch 4.0
If you haven't tried it yet, if you search for "Rat" in Rematch it will list all pets with Rat in their name first, with pets exactly named Rat at the top. (Unless Don't Sort By Relevance is checked in the options panel; but it's off by default.)Uduwudu wrote:That is one thing that I have not enjoyed with Blizzard, in the Pet Battle thing ... have you tried searching for a pet named "rat" at all? It includes all the dishes and moldy fruit in your fridge, and you're lucky to find a rat or two!
Actually the code spaghetti is much improved when handling by slot instead of pet. To the code going by slot is very direct and straightforward now; whereas by pet it had to infer whether a slot was controlled by the queue based on what pets are in the queue, what you've dragged anything into the loadout slots (and its neighbors), and whether a pet was leaving the queue. Computers are awful at inferring things. There was more code removed than added to convert from pet to slot control. It was so straightforward that I was able to remove the lockdown on the queue that prevented changing pets around while you were in battle/combat/pvp. Since you can't swap pets in battle/combat/pvp, any manipulation of the queue that had to swap loadout pets had to be done at that moment or it had to pay close attention to what was happening/had happened while it couldn't swap pets. Now it doesn't need to care at all. It just waits until it can swap pets and loads up the current ones.why "slot" and not handling a pet individually? Would that not be simply adding to the code spaghetti?
On your spreadsheet, I'm not 100% confident I'm reading it right but if I am it's possible to do in Rematch. You can filter pets that are rare that aren't 25, sort then by reverse level, etc. You can save that filter as a favorite filter too. And once you have the pet list refined to the ones you want to level, Queue -> Fill Queue will copy them over to the leveling queue. There's also collection stats so if you want to even out the different pet types you have as rare you can get a chart of how many rares you have of each type.
Re: Rematch 4.0
I'll get to it today or tomorrow ... in general, since I do not track "teams" (yet!?!), I am simply working on making sure I have a concise list of pets that need to level. I got this idea, as I watch my neighbor, pretty much hack up his pet list and have to clean up some 25 to 30 pets every so often. Maybe getting him Rematch might help him more, but he is like a kid in a candy store ... tomorrow he wants a different candy, and can not remember what he was doing or thinking, etc, etc, etc ... and it's fun to watch, but not helpful in these situations. He has Parkinson's and is on heavy meds, so playing this game for him is a nice way to concentrate and learn to focus a bit.Gello wrote: ...
On your spreadsheet, I'm not 100% confident I'm reading it right but if I am it's possible to do in Rematch. You can filter pets that are rare that aren't 25, sort then by reverse level, etc. You can save that filter as a favorite filter too. And once you have the pet list refined to the ones you want to level, Queue -> Fill Queue will copy them over to the leveling queue. There's also collection stats so if you want to even out the different pet types you have as rare you can get a chart of how many rares you have of each type.
My spreadsheet updates every moment a leveling rock is used, for example, and the pet moved upwards or the like as the list changes. Everyday, for example, I get one Blue (15 Charms) and likely 3 to 4 upgrade rocks. Thus, another blue gets added to the list from the green section, which keeps diminishing as time goes by. My list from 1 to 24 right now is at 181 pets, 113 already blue and the rest green, all of these to take to 25. If this happened automatically, let's say, I would know right away that I can take the pets that are 23 and 24 to a location to level them. Right now, 1 is 24 and 6 are 23. I'll be in the Timeless Isle tomorrow ... doing you know what! Gotta level 7 more.
Re: Rematch 4.0
This is a reply to Kakjens on curse but if any others have questions or interest on this topic feel free to chime in. I'm posting here instead of on curse since this forum's code tag is very nice and curse's comment system isn't very good for complex/long posts.
He posted some code that loads a heal team with two of the most injured pets while shift is held down in a specific zone (I assume celestial tournament). I recommend making a separate addon to do this so the direct edits don't need re-copied each update.
Sorry in advance if any of this covers ground you're already familiar with.
First step is to set up your toc with a Rematch dependency:
This will wait to load your code until after Rematch has loaded. It's important to note that this will load after Rematch loads but before any SavedVariables loads, which includes RematchSaved which contains the teams. This will be important later.
The function we want to modify is Rematch:PLAYER_TARGET_CHANGED. In lua these two are equivalent:
and
self is the calling frame. For this particular function/event we don't need to care about it, except it's important to remember it's there and it should be passed along.
To do an outright replacement of the function (which you don't want to do) you could:
Because your addon loads after Rematch does (since you declared it as a dependency), your version of Rematch.PLAYER_TARGET_CHANGED will replace the one defined in Main.lua.
This isn't what you wanted, of course. You want to modify the behavior of the existing function. You can do that a couple ways. If you want the entire function to run and then run your code after the old code ran (aka post-hook), you can use one of two methods. This is a secure hook:
Rematch.PLAYER_TARGET_CHANGED will do its thing and then your code will be called with the same parameters. This is a secure hook because it doesn't tamper with the original. It's most commonly used to post-hook Blizzard code, since tampering stuff in an execution path will taint everything your code manipulates.
An unsecure post-hook looks like:
This will save the pointer to the original function, then you can redefine the function to call the original and then your code. (Your code can be in the new Rematch:PLAYER_TARGET_CHANGED too; it's a separate function for clarity).
When you're doing an unsecure hook, it's very good practice to return the results as if you were the legitimate function. In this case there's nothing to return so it's not necessary, but it's critically important in most of the unsecure hooks you'll be doing.
But if you want to only do the original function some of the time, and your own stuff some of the time, you want a pre-hook like this:
If Shift is down it will run my_PLAYER_TARGET_CHANGED and not the original at all. If Shift is not down it will run the original.
In your particular case you want to deal with saved teams (RematchSaved), which is not defined when your addon loads. You can do this in one of two ways. The first is the use the global RematchSaved directly:
If Shift is down when targeting it will print whether a team is saved for the target, and then run my_PLAYER_TARGET_CHANGED regardless.
If you use a local at the beginning like:
RematchSaved isn't defined when your addon loads and the local reference will continue to be nil even after the global is defined later.
In a traditional addon you'd wait until PLAYER_LOGIN. If you'd rather not create a frame to register for that event, you can use Rematch:InitModule(func) to do stuff. When you call that it will run your function after PLAYER_LOGIN and after Rematch has validated saved variables and stuff:
If you want to be consistent with the main addon you can make a local rematch=Rematch too and use rematch. It will be defined before your code loads and it's safe to assign:
And now your code will persist and do its thing regardless of most changes made to Rematch.
I say most because the code is undergoing a great deal of change. However, Rematch.PLAYER_TARGET_CHANGED, Rematch.LoadTeam, etc will remain so chances are your code will continue relatively unchanged. The team format is changing slightly but the first index will remain the petID. But that will become obvious when it happens.
Maybe of particular interest to addon authors reading this (if any have gotten this far), but you'll be able to add your own tabs and panels to Rematch 5.0 very easily with a separate addon. I'm rebuilding the leveling queue to be a separate addon (so it can be disabled when someone is done leveling pets). In the future I may even add Discodoggy's earlier suggestion of a Records tab that will list the success of all pets. I mentioned back then it was a bit excessive for the addon to carry around for people who wouldn't use that feature; but as a separate addon it can go wild recording everything it wants.
Sorry for the long post!
He posted some code that loads a heal team with two of the most injured pets while shift is held down in a specific zone (I assume celestial tournament). I recommend making a separate addon to do this so the direct edits don't need re-copied each update.
Sorry in advance if any of this covers ground you're already familiar with.
First step is to set up your toc with a Rematch dependency:
Code: Select all
## Interface: 70000
## Title: RematchShiftTarget
## Notes: Does something different when Shift is held while targeting.
## Dependencies: Rematch
RematchShiftTarget.lua
The function we want to modify is Rematch:PLAYER_TARGET_CHANGED. In lua these two are equivalent:
Code: Select all
function Rematch:PLAYER_TARGET_CHANGED()
Code: Select all
function Rematch.PLAYER_TARGET_CHANGED(self)
To do an outright replacement of the function (which you don't want to do) you could:
Code: Select all
function Rematch:PLAYER_TARGET_CHANGED()
print("Do my stuff")
end
This isn't what you wanted, of course. You want to modify the behavior of the existing function. You can do that a couple ways. If you want the entire function to run and then run your code after the old code ran (aka post-hook), you can use one of two methods. This is a secure hook:
Code: Select all
local function my_PLAYER_TARGET_CHANGED(self)
print("Do my stuff")
end
hooksecurefunc(Rematch,"PLAYER_TARGET_CHANGED",my_PLAYER_TARGET_CHANGED)
An unsecure post-hook looks like:
Code: Select all
local old_PLAYER_TARGET_CHANGED = Rematch.PLAYER_TARGET_CHANGED
local function my_PLAYER_TARGET_CHANGED(self)
print("Do my stuff")
end
function Rematch:PLAYER_TARGET_CHANGED()
old_PLAYER_TARGET_CHANGED(self)
return my_PLAYER_TARGET_CHANGED(self)
end
When you're doing an unsecure hook, it's very good practice to return the results as if you were the legitimate function. In this case there's nothing to return so it's not necessary, but it's critically important in most of the unsecure hooks you'll be doing.
But if you want to only do the original function some of the time, and your own stuff some of the time, you want a pre-hook like this:
Code: Select all
local old_PLAYER_TARGET_CHANGED = Rematch.PLAYER_TARGET_CHANGED
local function my_PLAYER_TARGET_CHANGED(self)
print("Do my stuff")
end
function Rematch:PLAYER_TARGET_CHANGED()
if IsShiftKeyDown() then
return my_PLAYER_TARGET_CHANGED(self)
else
return old_PLAYER_TARGET_CHANGED(self)
end
end
In your particular case you want to deal with saved teams (RematchSaved), which is not defined when your addon loads. You can do this in one of two ways. The first is the use the global RematchSaved directly:
Code: Select all
local old_PLAYER_TARGET_CHANGED = Rematch.PLAYER_TARGET_CHANGED
local function my_PLAYER_TARGET_CHANGED(self)
print("Do my stuff")
end
function Rematch:PLAYER_TARGET_CHANGED()
if IsShiftKeyDown() then
local name,npcID = Rematch:GetUnitNameandID("target")
if RematchSaved[npcID] then
print("A team is saved for",name)
end
return my_PLAYER_TARGET_CHANGED(self)
else
return old_PLAYER_TARGET_CHANGED(self)
end
end
If you use a local at the beginning like:
Code: Select all
local old_PLAYER_TARGET_CHANGED = Rematch.PLAYER_TARGET_CHANGED
local saved = RematchSaved -- this will fail!
local function my_PLAYER_TARGET_CHANGED(self)
print("Do my stuff")
end
function Rematch:PLAYER_TARGET_CHANGED()
if IsShiftKeyDown() then
local name,npcID = Rematch:GetUnitNameandID("target")
if saved[npcID] then
print("A team is saved for",name)
end
return my_PLAYER_TARGET_CHANGED(self)
else
return old_PLAYER_TARGET_CHANGED(self)
end
end
In a traditional addon you'd wait until PLAYER_LOGIN. If you'd rather not create a frame to register for that event, you can use Rematch:InitModule(func) to do stuff. When you call that it will run your function after PLAYER_LOGIN and after Rematch has validated saved variables and stuff:
Code: Select all
local old_PLAYER_TARGET_CHANGED = Rematch.PLAYER_TARGET_CHANGED
local saved
Rematch:InitModule(function()
saved = RematchSaved
end)
local function my_PLAYER_TARGET_CHANGED(self)
print("Do my stuff")
end
function Rematch:PLAYER_TARGET_CHANGED()
if IsShiftKeyDown() then
local name,npcID = Rematch:GetUnitNameandID("target")
if saved[npcID] then
print("A team is saved for",name)
end
return my_PLAYER_TARGET_CHANGED(self)
else
return old_PLAYER_TARGET_CHANGED(self)
end
end
Code: Select all
local rematch = Rematch
local old_PLAYER_TARGET_CHANGED = rematch.PLAYER_TARGET_CHANGED
local saved
rematch:InitModule(function()
saved = RematchSaved
end)
local function my_PLAYER_TARGET_CHANGED(self)
print("Do my stuff")
end
function Rematch:PLAYER_TARGET_CHANGED()
if IsShiftKeyDown() then
local name,npcID = rematch:GetUnitNameandID("target")
if saved[npcID] then
print("A team is saved for",name)
end
return my_PLAYER_TARGET_CHANGED(self)
else
return old_PLAYER_TARGET_CHANGED(self)
end
end
I say most because the code is undergoing a great deal of change. However, Rematch.PLAYER_TARGET_CHANGED, Rematch.LoadTeam, etc will remain so chances are your code will continue relatively unchanged. The team format is changing slightly but the first index will remain the petID. But that will become obvious when it happens.
Maybe of particular interest to addon authors reading this (if any have gotten this far), but you'll be able to add your own tabs and panels to Rematch 5.0 very easily with a separate addon. I'm rebuilding the leveling queue to be a separate addon (so it can be disabled when someone is done leveling pets). In the future I may even add Discodoggy's earlier suggestion of a Records tab that will list the success of all pets. I mentioned back then it was a bit excessive for the addon to carry around for people who wouldn't use that feature; but as a separate addon it can go wild recording everything it wants.
Sorry for the long post!
Re: Rematch 4.0
That's really neat! Thanks Gello!
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829
Re: Rematch 4.0
I swear this was brought up before, but for the life of me I can't find it: is there a way to have a "capture team" or some default team that gets used whenever you're fighting an unlisted/unknown opponent?
Re: Rematch 4.0
There is not an option specifically for this. The only time teams automatically load is with the Auto Load option. And the default behavior of this is to watch mouseover to see if anything under the mouse needs loading. Fair enough, load a target when you mouseover one and load a default team when you mouseover something that's not a saved target. Except as you move the mouse across the screen you can get 3+ team loads happening in rapid succession. The server will only allow so many swaps at a time and it would become too common to enter a battle with mix of pets/abilities from two different teams.Salus wrote:I swear this was brought up before, but for the life of me I can't find it: is there a way to have a "capture team" or some default team that gets used whenever you're fighting an unlisted/unknown opponent?
With Auto Load -> On Target Only checked it's much more doable. Even kind of trivial. The On Target Only option is something I kinda wish wasn't there, but it exists and people use it and I'll continue to support its behavior, but I'd rather not make new incentives to use that option.
I could make an exception to auto load where it only works on mouseover for saved targets and then only on target for unsaved targets. But right now I feel this behavior would not be clear to the user and it would feel weird. If some UI method comes to mind to make this more obvious I can consider it.
My personal solution is to turn on the minimap button and then have a few teams favorited. Right-click of the minimap button will let you load your favorite teams at the button instead of pulling up the window. You can also macro /rematch Capture Team to load a team too.
Re: Rematch 4.0
Looked but couldn't find the option,
some pets are used alot, i even have multiple of the same breed etc in my collection.
but would be nice if rematch uses a certain pet and its dead (or half dead),
there is option to auto load any (full hp) duplicates that might be in the collection.
some pets are used alot, i even have multiple of the same breed etc in my collection.
but would be nice if rematch uses a certain pet and its dead (or half dead),
there is option to auto load any (full hp) duplicates that might be in the collection.
Re: Rematch 4.0
I've had an "understudy" on the long term plans for a while. But maybe something can be done in the interim to automatically swap in a duplicate pet. This is a great suggestion thanks!
Would it be okay if they were the same level/rarity but a different breed?
Would it be okay if they were the same level/rarity but a different breed?
Re: Rematch 4.0
Well that hard one there few fights out there that really require a certain pets (for example a snail with at least speed 300)
making it configurable per fight might make saving all those fight can get a bit tedious,
or globaly any pet with exact same abilities is usually good enough
and over-writable (fixed breed and pet) per saved team (fight)
also reminds me of old feature/request in picture, add a certain level/hp requirement for the leveling pet (usually so doesn't die from aoe), and also that it get saved so sharable with others
but atm i would just settle for any breed of exact same pet.
ps. can see this making the UI really complex, so maby just enable it "expert mode" or just only by save string
making it configurable per fight might make saving all those fight can get a bit tedious,
or globaly any pet with exact same abilities is usually good enough
and over-writable (fixed breed and pet) per saved team (fight)
also reminds me of old feature/request in picture, add a certain level/hp requirement for the leveling pet (usually so doesn't die from aoe), and also that it get saved so sharable with others
but atm i would just settle for any breed of exact same pet.
ps. can see this making the UI really complex, so maby just enable it "expert mode" or just only by save string
Re: Rematch 4.0
I like simplicity. Like you said the UI could get complex with configuration stuff. Plus there's a lot of code behind the scenes that would have to happen to add new team fields. Export/import strings would be more code than all the rest of the additions combined so that's definitely not happening.
I was originally thinking of adding a couple options:
[ ] Replace Dead Pets With Live Pets
..[ ] Only Exact Match
..[ ] For Injured Pets Too
The main option would choose a live pet of the same (or higher) level/rarity. And the second option would only do the replacement for an exact match (same breed). And the third option would replace injured pets with the same pet of higher health.
After thinking about it a bit, is there ever a situation where someone wouldn't want an exact match in place of a dead version of the pet?
If the answer to that is no, a much simpler solution may be for this replacement to always happen with an exact match (default behavior; no option) and where an exact match can't be found but a similar match can, it pops up a window asking if you want to replace the dead pet with this copy it found in your journal. For those that don't want this popup it will have a checkbox (also in the confirmations options) to turn off the popup on future dead pets.
A few issues with that is the lack of an option will make it impossible to turn off the exact-match behavior, no option for injured pets, and I dislike making automatic swaps a default. Option bloat is a problem.
I was originally thinking of adding a couple options:
[ ] Replace Dead Pets With Live Pets
..[ ] Only Exact Match
..[ ] For Injured Pets Too
The main option would choose a live pet of the same (or higher) level/rarity. And the second option would only do the replacement for an exact match (same breed). And the third option would replace injured pets with the same pet of higher health.
After thinking about it a bit, is there ever a situation where someone wouldn't want an exact match in place of a dead version of the pet?
If the answer to that is no, a much simpler solution may be for this replacement to always happen with an exact match (default behavior; no option) and where an exact match can't be found but a similar match can, it pops up a window asking if you want to replace the dead pet with this copy it found in your journal. For those that don't want this popup it will have a checkbox (also in the confirmations options) to turn off the popup on future dead pets.
A few issues with that is the lack of an option will make it impossible to turn off the exact-match behavior, no option for injured pets, and I dislike making automatic swaps a default. Option bloat is a problem.
Re: Rematch 4.0
Understandable, but too bad think the hp/level required for the leveling pet would be really high on wish list for alot of usGello wrote:I like simplicity. Like you said the UI could get complex with configuration stuff. Plus there's a lot of code behind the scenes that would have to happen to add new team fields. Export/import strings would be more code than all the rest of the additions combined so that's definitely not happening.
Maby 5.0
If i know i use pet multiple times in different fights i make sure i have copies of it,Gello wrote: ***
After thinking about it a bit, is there ever a situation where someone wouldn't want an exact match in place of a dead version of the pet?
If the answer to that is no, a much simpler solution may be for this replacement to always happen with an exact match (default behavior; no option) and where an exact match can't be found but a similar match can, it pops up a window asking if you want to replace the dead pet with this copy it found in your journal. For those that don't want this popup it will have a checkbox (also in the confirmations options) to turn off the popup on future dead pets.
A few issues with that is the lack of an option will make it impossible to turn off the exact-match behavior, no option for injured pets, and I dislike making automatic swaps a default. Option bloat is a problem.
so for me answer would be no, and on the not-full-hp pets swap them also, and maby add that as well an option to disable
(or make all options to turn function of swaping on)
Re: Rematch 4.0
On the topic of understudies. Breed matters too much for that to be different in a lot of cases. Different speed stats can make or break a good strategy.
Rematch already has HP/Level reqs settable for the levelling pet (right click team, Edit Preferences)Palatank wrote:Understandable, but too bad think the hp/level required for the leveling pet would be really high on wish list for alot of usGello wrote:I like simplicity. Like you said the UI could get complex with configuration stuff. Plus there's a lot of code behind the scenes that would have to happen to add new team fields. Export/import strings would be more code than all the rest of the additions combined so that's definitely not happening.
Maby 5.0
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829
Re: Rematch 4.0
Oh yeah for the leveling pet it already exists. I thought you wanted to apply the leveling preferences system to criteria of replacing duplicate pets. Having gone through it already for preferences, it's a non-trivial amount of code that would massively dwarf the benefit of the relatively minor feature of choosing which duplicate pet to choose.
I need to find a better way to make it known preferences exist. At one time there was a preferences button on the save dialog. Maybe that should come back.
Also you can set leveling preferences for individual teams (such as min/max health/level for individual tamers) and also for an entire team tab (for like 23) in their right-click menus.
I need to find a better way to make it known preferences exist. At one time there was a preferences button on the save dialog. Maybe that should come back.
Also you can set leveling preferences for individual teams (such as min/max health/level for individual tamers) and also for an entire team tab (for like 23) in their right-click menus.
Re: Rematch 4.0
Is there any option to change the scrolling speed of pets to make it similar to the normal pet journal I absolutely can't find an option for it on the window.