Download
(1Kb)
Download
Updated: 08-01-23 05:35 AM
Compatibility:
Fractures in Time (10.1.5)
Updated:08-01-23 05:35 AM
Created:02-03-23 05:38 AM
Downloads:190
Favorites:2
MD5:

Zoned Quests

Version: 0.2.2
by: zestyquarks [More]

A very tiny, fast, efficient mod whose only purpose is to ensure that the quests currently tracked are relevant to the zone you're in. When you switch zones, it'll change your tracked quests accordingly. It'll also update when you accept a quest. That's it.

If you personally mark a quest as tracked, it'll stay that way unless you untrack or complete it. This will persist for the character you tracked it on.

There's also an exclusions list for quests that don't really have a set area. I'll add to these as I come across them.

Accounted for thus far:
Valentine's Day - Bonbon Blitz

0.2.2

* Feature: Implementation of database to remember tracked quests.

0.1.7

* Toc bump.

0.1.6

* Oops. Uploaded wrong commit.

0.1.4

* New: Quests can now be made to remain in the log even when changing areas by manually tracking them. This behaviour remains until a UI reload or logout occurs, and the behaviour can be stopped by manually untracking the quest.

0.1.3

* Fix: If ZonedQuests randomly stops/starts working for you mysteriously? That should be fixed and it'll work consistently now.
* Technical explanation: Initially ZonedQuests worked for my partner and I, but recently it stopped working for my partner. On investigating, I found that the WAYPOINT_UPDATE event I was tracking stopped firing for them, but it was still firing for me. Weird. WAYPOINT_UPDATE is an event that fires (or should fire) when the zone area changes and POIs are updated, which is a good time to check which quests should be tracked or not. Thankfully though, AREA_POIS_UPDATED was still firing for both of us. Since it's more consistent, I've switched out WAYPOINT_UPDATE for AREA_POIS_UPDATED. Now if the AREA_POIS_UPDATED event becomes inconsistent... I'll figure out what to do from there.

0.1.2

* Toc bump.

0.1.1

* I noticed that C_QuestLog.GetInfo can, in very rare cases, return nil. So I now have a check for htat. In all my testing though, the questID returned from GetInfo is never missing. So I've changed my checks accordingly. I wanted ZQ running as quickly and efficiently as possible.

0.1.0

* I did a regression. I fixed that regression.

0.0.9

* The only issue I've noticed is that quests without a map location set (such as certain holiday quests) won't be set as tracked. That's a problem. I can't just say, hey, if the quest isn't on the map, allow all quests, because then we're back to square point and the purpose of this mod is moot. So, either I have to let these particular quests fall through the tracks, or create a small database of them. I've started to do that, Bonbon Blitz is now in there. If you know of a list of these quests without map locations, or you find any quests like this, please let me know of the list/name of the quest respectively in teh comments. Thank you!

0.0.8

* Tossed in QUEST_ACCEPTED for those quests that are a whole bunch of zones away.
* I made some small changes to the code to bring it in-line with changes I'm making to all of my addons.

0.0.7

* After a lot of testing with /etrace, I've switched from my function hook to a very reliable event that seems to always fire reliably.
* I've removed the check that stops the code from running more than once in the same zone as multiple passes can result in higher accuracy, due to how POI visibility goes. I did some profiling and it doesn't even register compared to any of the other addons I'm running, so I think it's fine to just have the function run a little more often.
* I've properly localised everything in ENV that I'm using.
* I think that—without preloading POIs as that could be messy and isn't a best practise—this is about as good as it's going to get. So aside from future bugfixes, I think this is done.

0.0.5

* I can be silly, sometimes. I changed something on a whim that I forgot about, not a good change. Should be good, now.

0.0.4

* I brought back the delay. In one round of tests it didn't seem to be necessary, but I guess I got lucky. Horrible, horrible luck! In another, though? It fudged. So, the delay's back. No other changes.

0.0.3

* Events are notoriously imprecise, so I've moved over to securely hooking a much more reliable function.

0.0.2

* After a lot more testing, I've realised that the checks I was doing was still overkill.

0.0.1

* Initial release to WoW Interface.
Post A Reply Comment Options
Unread 03-05-23, 12:54 PM  
zestyquarks
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 8
Hey, no problem.

I'm just an old fart with too much time on my hands. I'm happy to help. It might be worth profiling Plater to see if there's any point where it has CPU/RAM usage spikes which are causing some kind of bottleneck. I think this might be why I can't reproduce it, too. I don't run nameplate mods because, as I said, I'm running WoW on a potato and they're a bit heavy for me. It's not that the addon authors are doing anything wrong, it's more the nature of the nameplate system. On this clunker, I've even had minor stutters here and there coming from the default Blizzard nameplates (especially if both friendly nameplates and compact party/raid frames are enabled, because that's an especially janky combination, for whatever reason).

It is nice to know though that it isn't ZQ up to no good, because that's been a bit of a head-scratcher. I do appreciate you coming back and telling me. It's a kindness. It means that I don't have to worry about it.

Hm. So, yes. If you use the mix of friendly nameplates and compact party/raid frames, try turning one of those off. Even if you aren't in a party, the compact frame shows for the player so there could still be something going on there. I wish I had more to offer you. Good luck on your adventures! I hope you track down the source of this.
Report comment to moderator  
Reply With Quote
Unread 03-05-23, 08:36 AM  
Elrigh
A Murloc Raider

Forum posts: 7
File comments: 19
Uploads: 0
Thanks for digging into the matter, but I am convinced now that it has nothing to do with your addon.
After logging in today I flew back to Kil'sorrow Fortress and experienced no lag while having your addon turned on. It seems the lag appears only once in specific areas which I havenīt visited with that Char yet.
And rather then turning off your Addon I think that a reload solved the problem.
Still donīt know what exactly causes the problem, but because it is happening in the oldest expansion and not in DF at all I donīt stress myself out to much to find the cause.

I took a look onto the InCombatLockdown() but that canīt be the case because I am now 70 visiting 30 mobs which do not react to me at all unless I run right through them, the lags happened during flying in a certain height without any mobs in range at all.

Right now I tend to think that Plater might be the problem, because on both events I flew into an area with lots of mobs, having lots of nameplates popping up at once, inlcuding buffs, that might be the problem, However, I could not reproduce it in every crowded area.

But now I am convinced that your Addon is not to blame for the lag and if it happens again I just try a reload. While deactivating an Addon the game reloads anyway, which I think was the fix here, not turning off your Addon.

Sorry to cause you so much trouble and again, thanks for the Addon.
Report comment to moderator  
Reply With Quote
Unread 03-05-23, 06:23 AM  
zestyquarks
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 8
I wish I could help more. I mean, even if it wasn't the addon, I'd want to help, you know? That's why I suggested checking out AddonUsage.

I know it's not ZonedQuests as I run on a potato with 8gb of RAM and I need to be careful about the mods I choose. Some can be stutter-city. It's why I tend to profile my choices with AddonUsage for a while before giving them a permanent place in my collection. It's not fair to bad mouth anyone for this because if they have a butch computer, they won't see any problems. And there's a lot of coders out there who haven't been coding for long, so they don't know how important it is to profile and bench. They might not even know that these are a thing. It's not okay to destroy their confidence.

I mean, there are some mods out there which feel like popularity contests where only the most minimum amount of work is put in and they bench/profile horribly, and there are hundreds of improvements that could be made to improve their overall performance. But those are in the minority.

Even though I suspect that this is another addon, it's probably one by a well-meaning dev who didn't realise that this event fired that much, or that it's bad to add so much weight to that function hook, et cetera. The thing is is that nothing exists in a vacuum, it's all connected. This is why I brought up the notion of InCombatLockdown(). See, if one addon hooks that function and does some heavy stuff with it, that'd be fine for them because they might not have anything that regularly checks for combat state. And for another mod, it's fine to check for combat state regularly because that function doesn't even have an infinitesimal hit on resources when standing on its own.

This is where the idea of localising your functions comes from, because usually that'd mean that you'd get a version of that function before it got hooked. Maybe. But I'm not sure that that's actually true when considering the likes of hooksecurefunc().

Anyway, the long and the short of it is that using mods in a janky old MMO like WoW is going to cause a lot of problems because nothing exists in a vacuum. WoW is even worse than most (as much as I adore its content, especially the Dragon Isles) since it has viral taint, where an innocent mod can be implicated of taint with a claim that it fired a function that it doesn't even use. Again, all of this is because nothing exists in a vacuum when it comes to games and mods, it's all one, big interconnected lump.

It gets even more fun when some settings can result in lag or problems for mods that addon authors might not even know about and have to discover down the line, then account for. It's a whole thing to make addons for an MMO.

So, yes, when you encounter a problem it's like...

* Is it an addon?
* Is it this addon or an interaction with another?
* Is it the base UI and not an addon at all?
* Is it a weird interaction between the base UI and an addon?

That's why the amount of success you'll have using mods will vary depending on how tech-literate you are and how much of an addon coder you yourself are. This is unfortunately true in regards to any game that has mods. If you've ever tried modding a Bethesda game, you'll know just what I mean. It really pays for everyone who's using mods to also be a modder.

I wish I had something more useful to share than that.
Report comment to moderator  
Reply With Quote
Unread 03-04-23, 08:31 PM  
Elrigh
A Murloc Raider

Forum posts: 7
File comments: 19
Uploads: 0
Hi, Sorry to answer so late, I wasnīt able to play much in the last days.

I turned the Addon off back then when I commented here and turned it on today after reading your post - without editing anything. I did some DF stuff, mostly Dungeons, then Darkmoon Fair and finally returned to BC - non Chromie - flying around in Auchindon and Alliance Stronghold and continued questing in Nagrand.

For two hours straight I have not experienced any problems. Did not add or disable any addons, but some got updated automatically.

Right now I tend to think the same as you, maybe a problem with another Addon, which got fixed with an update meanwhile. It could even be just pure coincidence, but that would be a strange one because I never experienced such a stutter before.

However, everything is working fine and as intended. Thank you for your time to check on it and thanks again for the Addon.

Edit: Sadly, I experienced another strange lag. At Kil'sorrow Fortress in Nagrand, when I flew up to it the stuttering was back and kept going until I turned off the Addon. It might be a problem with Plater, I noticed the Stuttering when the NPCs "popped" up in sight, but I experienced no problems while your Addon was off.
Again I forgot to try a simple reload before turning it off. I turned it on again and will see if I get another Stuttering. Still thinking that the Addon might not be the problem at all, maybe I would experience the stuttering without it, when flying into specific areas for the first time, but this problem does not occur in Dungeons (which might be another hint to Plater, which is turned off in Dungeons) or Dragonisle.
Last edited by Elrigh : 03-04-23 at 09:08 PM.
Report comment to moderator  
Reply With Quote
Unread 02-27-23, 09:59 AM  
zestyquarks
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 8
@Elrigh

Hi, thanks for checking out my work, but... I don't think that could happen?

You could actually look at the code, if you wanted. It's a tiny addon and its purpose is clear. Why I don't see how that could happen is that the code only runs on two specific events.

* QUEST_ACCEPTED
* WAYPOINT_UPDATE

You can use /etrace in-game to see how often these fire. The first only fires when you confirm that you want to do a quest by hitting the accept button, the second only runs when something happens that changes the map POIs. In the case of the second, that's things like changing zones, and certain types of quest progress. You could even throw a print into the upd() function to see for yourself, if you like.

The only ongoing timer that the mod triggers is purely for combat, which it checks InCombatLockdown() for. Now, InCombatLockdown() only fires when you're in combat, and it utilises no measurable resource to make this check. I've profiled this with a mod called AddonUsage, and I'd advise you to check that out too. On my list of addons, Zoned Quests never really registers as using any resources, it's always near the bottom when it comes to resource usage.

The only conclusion that I can draw is this: Something is either somehow tampering with InCombatLockdown() or making WAYPOINTS_UPDATE fire way, way more often than it should. The way you can confirm this for yourself would be to load Zoned Quests alone, with no other addons loaded.

I'd be more likely to belive that Zoned Quests might be at fault if I hadn't done my due diligence with /etrace and event logs. Which I did. I was looking for the perfect events to use for this mod (as I tend to with all my mods, when I use events). So I spent a lot of time pouring over event logs to find those that trigger at the right time without triggering too much. I know some events trigger all the time without any reason for it (like QUEST_LOG_UPDATE, I think it was).

TL;DR: It's most likely an addon conflict. I can't reproduce it, and AddonUsage shows that Zoned Quests coudln't possibly be causing a drain (let alone enough of one to result in stutter).

Edit: How about this? Can you open ZonedQuests.lua in notepad? Just find it in the folder and drag it onto a notepad. Clear the text out of it, then put this in.

Code:
local ql = C_QuestLog
local cf, ta, aq, rq, iw, gi, gn, ic, d = CreateFrame, C_Timer.After, ql.AddQuestWatch, ql.RemoveQuestWatch, ql.IsWorldQuest, ql.GetInfo, ql.GetNumQuestLogEntries, InCombatLockdown

local hd  = {
  [24636] = true}

local function upd()
  if ic() or not d then
    print"Zoned quests delay occuring. Should only happen once unless you're in combat."

    ta(0.5, upd) d = true return
  end

  print"Zoned Quests function running. Handling quest update."

  local q, f

  for i = 1, gn() do
    q = gi(i)

    if q and not q.isHidden and not q.isHeader and not iw(q.questID) then
      f = (q.isOnMap or hd[q.questID]) and aq or rq f(q.questID)
    end
  end

  d = nil
end

local f = cf"Frame"
f:RegisterEvent"QUEST_ACCEPTED"
f:RegisterEvent"WAYPOINT_UPDATE"
f:SetScript("OnEvent", upd)
Okay, so, you'll get spammed if you're in combat because the mod doesn't run in combat due to potential taint problems.

Here's what to look out for:

* Is the "function running" print being spammed at any point (in or out of combat)?
* Is the combat delay print being spammed outside of combat for you?

If the answer to both of these is no, then it's definitely not Zoned Quests doing it.

Edit 2: If the stutter only happens in combat, then my running theory is that you're running an addon that's very naughtily hooiked InCombatLockdown() to run some very heavy code.

If it isn't obvious, I am trying to help but... figuring out issues that one cannot reproduce on one's own end are the worst to solve. That's why some programmers just flag something as "Cannot Reproduce" and leave it at that.
Last edited by zestyquarks : 02-27-23 at 10:21 AM.
Report comment to moderator  
Reply With Quote
Unread 02-27-23, 04:28 AM  
Elrigh
A Murloc Raider

Forum posts: 7
File comments: 19
Uploads: 0
Searched for an Addon of these kind for quite some time. Was happy to find it
But after I installed it I experienced stuttering, every couple of seconds my game froze for a sec. Unplayable. First thing I did was turning this Addon off, which caused a restart and the problem went away. Canīt really proof that it was caused by the Addon unless I turn it on again and see what happens, might do that during my next play session.
The Stuttering occured during the leveling of a Twink in Chromies Version of TBC, flying from Auchindon to Alliance Stronghold, donīt know if that would happened anywhere else.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: