Routes is currently bugging out when using HandyNotes as a data source.
Have not used the mod since long before HandyNotes was last updated, so may be related to one of its updates. Routes v1.2.8a-4-ga72021e, HandyNotes v1.1.5, GatherMate r691, Ace3 r965 (disembedded).
1. Load the mod options panel by typing /routes (no prior saved variables present).
2. Click the Add button (first error below occurs then).
3. Then uncheck "HandyNotes" in the Select Sources of Data section (GatherMate is the other data source available here; it has no issues with Routes).
4. Close the options box. Reopen it and recheck "HandyNotes" in the area above (second error below occurs then).
["message"] = "Routes-v1.2.8a-4-ga72021e\\Plugins\\HandyNotes.lua:41: table index is nil\nRoutes-v1.2.8a-4-ga72021e\\Routes.lua:2132: in function `member'\nAceConfigDialog-3.0-49:251: in function <...nfig-3.0\\AceConfigDialog-3.0\\AceConfigDialog-3.0.lua:199>\nAceConfigDialog-3.0-49:1191: in function <...nfig-3.0\\AceConfigDialog-3.0\\AceConfigDialog-3.0.lua:1051>\nAceConfigDialog-3.0-49:1538: in function `FeedGroup'\nAceConfigDialog-3.0-49:1463: in function <...nfig-3.0\\AceConfigDialog-3.0\\AceConfigDialog-3.0.lua:1443>\n(tail call): ?:\n<in C code>: ?\n<string>:\"safecall Dispatcher[3]\":9: in function <[string \"safecall Dispatcher[3]\"]:5>\n(tail call): ?:\nAceGUI-3.0-33 (Ace3):314: in function `Fire'\n...ce3\\AceGUI-3.0\\widgets\\AceGUIContainer-TreeGroup.lua:473: in function `SetSelected':\n...ce3\\AceGUI-3.0\\widgets\\AceGUIContainer-TreeGroup.lua:192: in function <...ce3\\AceGUI-3.0\\widgets\\AceGUIContainer-TreeGroup.lua:188>:\n\n ---",
["type"] = "error",
["session"] = 732,
["counter"] = 1,
}, -- [221]
[FONT=monospace][FONT=verdana]
After doing steps 3. & 4. above:
[/FONT][/FONT]
["message"] = {
"Routes-v1.2.8a-4-ga72021e\\Plugins\\HandyNotes.lua:41: table index is nil\nRoutes-v1.2.8a-4-ga72021e\\Routes.lua:2132: in function `member'\nAceConfigDialog-3.0-49:251: in function <...nfig-3.0\\AceConfigDialog-3.0\\AceConfigDialog-3.0.lua:199>\nAceConfigDialog-3.0-49:1191: in function <...nfig-3.0\\AceConfigDialog-3.0\\AceConfigDialog-3.0.lua:1051>\nAceConfigDialog-3.0-49:1538: in function `FeedGroup'\nAceConfigDialog-3.0-49:1463: in function <...nfig-3.0\\AceConfigDialog-3.0\\AceConfigDialog-3.0.lua:1443>\n(tail call): ?:\n<in C code>: ?\n<string>:\"safecall Dispatcher[3]\":9: in function <[string \"safecall Dispatcher[3]\"]:5>\n(tail call): ?:\nAceGUI-3.0-33 (Ace3):314: in function `Fire'\n...ce3\\AceGUI-3.0\\widgets\\AceGUIContainer-TreeGroup.lua:486: in function `Select':\n...ce3\\AceGUI-3.0\\widgets\\AceGUIContainer-TreeGroup.lua:494: in function `SelectByValue':\nAceConfigDialog-3.0-49:1638: in function `FeedGroup'\nAceConfigDialog-3.0-49:1814: in function `Open'\nAceConfigDialog-3.0-49:862: ", -- [1]
"in function <...nfig-3.0\\AceConfigDialog-3.0\\AceConfigDialog-3.0.lua:854>\n(tail call): ?:\n<in C code>: ?\n<string>:\"safecall Dispatcher[3]\":9: in function <[string \"safecall Dispatcher[3]\"]:5>\n(tail call): ?:\nAceGUI-3.0-33 (Ace3):314: in function `Fire'\n...ns\\Ace3\\AceGUI-3.0\\widgets\\AceGUIWidget-CheckBox.lua:68: in function <...ns\\Ace3\\AceGUI-3.0\\widgets\\AceGUIWidget-CheckBox.lua:57>:\n\n ---", -- [2]
},
["type"] = "error",
["session"] = 732,
["counter"] = 1,
}, -- [222]
There were for sure no invalid HandyNotes present in the zones these errors occurred on; they occurred in 4 different zones tried. No problems after either deleting the HandyNotes.lua Routes module or commenting it out in the TOC. And no problems using GatherMate alone as the data source[FONT=monospace].
[/FONT]
I know this is a bit slow in replies, but I took a look at your case (and your ticket), and concluded that it is an invalid report. What happens is that you have a HandyNote with a nil title, which is a symptom that when you imported data from Cartographer_Notes, the import was improperly done. HandyNotes by default will not have a nil title, if the title was left blank, it would be an empty string "".
Granted, I will probably add a nil check now just to avoid it. [This nil check will be in a alpha commit after the v1.3.0 tag]
(Tradeskill) Nodes should be auto-added at least for Gathermate (as a waypoint between the two nearest waypoints, so it should still be rather optimized) but imported nodes don't get noticed until you re-create the route.
Re-optimizing do not add the newly discovered nodes and I'm using Gatherer so I guess I'm out of luck.
That's correct, Gatherer does not have any method to inform other addons when it finds a new node. I've been talking to Esamynn on and off about it, he's interested in implementing something, but he's really busy.
That's correct, Gatherer does not have any method to inform other addons when it finds a new node. I've been talking to Esamynn on and off about it, he's interested in implementing something, but he's really busy.
Can you point me to the function that needs to be called in routes when an update occurs. Maybe I can hack something for new nodes on my local copy and pass it along if it's any good.
Here's a quick patch for Plugins\Gatherer.lua to get the nodes that are added to Gatherer after a route was first created. Just add the following code at the end:
local idToName = nil
if Gatherer and Gatherer.Api.AddGather then
local origAddGather = Gatherer.Api.AddGather
Gatherer.Api.AddGather = function(objectId, gatherType, indoorNode, gatherSource, gatherCoins, gatherLoot, wasGathered, gatherC, gatherZ, gatherX, gatherY, ...)
-- Only add route for successful addition in Gatherer
if origAddGather(objectId, gatherType, indoorNode, gatherSource, gatherCoins, gatherLoot, wasGathered, gatherC, gatherZ, gatherX, gatherY, ...) then
-- When we do the gathering ourselves
if not (gatherC and gatherZ and gatherX and gatherY) then
gatherC, gatherZ, gatherX, gatherY = Gatherer.Util.GetPositionInCurrentZone()
end
local nodeName = Gatherer.Util.GetNodeName(objectId)
local newCoord = Routes:getID(gatherX, gatherY)
if not idToName then
-- build the table to get the zone name from the continentId and the ZoneId
idToName = {}
for zoneName, zoneTable in pairs(Routes.LZName) do
local continentId, zoneId = zoneTable[3], zoneTable[4]
idToName[continentId] = idToName[continentId] or {}
idToName[continentId][zoneId] = zoneName
end
end
local zoneName = (idToName[gatherC] and idToName[gatherC][gatherZ]) or ""
Routes:InsertNode(zoneName, newCoord, nodeName)
end
end
end
There is no API to remove node in Gatherer so I didn't anything for Routes:DeleteNode()
Also, since I didn't want to redo all my existing routes, I did the following:
local function RefreshZoneNodes(zoneName)
zoneName = zoneName or _G.SetMapToCurrentZone() or _G.GetRealZoneText()
local continentId = Routes.LZName[zoneName][3]
local zoneId = Routes.LZName[zoneName][4]
for index, objectId, gType in _G.Gatherer.Storage.ZoneGatherNames( continentId, zoneId ) do
local x, y = _G.Gatherer.Storage.GetGatherInfo(continentId, zoneId, objectId, gType, index)
if x and y then
local newCoord = Routes:getID(x, y)
local nodeName = _G.Gatherer.Util.GetNodeName(objectId)
Routes:InsertNode(zoneName, newCoord, nodeName)
end
end
end
source.RefreshZoneNodes = RefreshZoneNodes
-- /script Routes.plugins["Gatherer"].RefreshZoneNodes()
I use this to refresh the current zone or a particular zone by zone.
I just switched, finally, from FuBar to entire LDB replacements, and I've run up against a wall. Broker_Routes doesn't, unfortunately, recreate the features I used RoutesFu for (easy access to displaying/hiding routes, and starting/stopping/changing directions for waypoints).
Is there a published API somewhere I haven't found yet I could peek at as I consider trying to add this functionality into Broker_Routes for myself, or should I just start reading the code itself? (Which I can do, just wondered if there was a centralized Routes API published somewhere to save some time)
You can look at the code of Fubar_RoutesFu. It's quite a small addon. Other than that, no, there isn't any API, since I'm accessing the database in Routes _directly_ in the code, like...
zone_data = CR.db.global.routes[zone]
Routes' db format is in comments at the top of Routes.lua. A route is an array of coordinates, with a possible metadata table for clustered routes (where it stores what each clustered node original nodes are). Look in your SavedVariables.
Just edit the local Routes.toc, it works fine with 4.1
Or click the "Load out of Date addons" checkbox, you know. It's there so you don't actually have to edit the TOC, so you can actually know which addons are potentially broken/outdated.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How DARE you care for your own amusement, we demand updates! :p
Man, by now I really wish I could afford the flight over the pond, Dethling looks awesome... anyway, have fun there!
I know this is a bit slow in replies, but I took a look at your case (and your ticket), and concluded that it is an invalid report. What happens is that you have a HandyNote with a nil title, which is a symptom that when you imported data from Cartographer_Notes, the import was improperly done. HandyNotes by default will not have a nil title, if the title was left blank, it would be an empty string "".
Granted, I will probably add a nil check now just to avoid it. [This nil check will be in a alpha commit after the v1.3.0 tag]
Well, turns out the thing wasn't too hard to fix. So its all fixed now.
And yeah Dethling!
http://www.wowace.com/addons/routes/tickets/27-routes-not-updated-for-new-4-0-3a-zones/
Quick question: is there a way to refresh a route with new node data without deleting and recreating it?
TIA
That's correct, Gatherer does not have any method to inform other addons when it finds a new node. I've been talking to Esamynn on and off about it, he's interested in implementing something, but he's really busy.
Can you point me to the function that needs to be called in routes when an update occurs. Maybe I can hack something for new nodes on my local copy and pass it along if it's any good.
UPDATE: I deleted both GM2 and Routes from my system and install fresh copies and they work now.
There is no API to remove node in Gatherer so I didn't anything for Routes:DeleteNode()
I use this to refresh the current zone or a particular zone by zone.
Is there a published API somewhere I haven't found yet I could peek at as I consider trying to add this functionality into Broker_Routes for myself, or should I just start reading the code itself? (Which I can do, just wondered if there was a centralized Routes API published somewhere to save some time)
Loving the addon in general, though.
zone_data = CR.db.global.routes[zone]
Routes' db format is in comments at the top of Routes.lua. A route is an array of coordinates, with a possible metadata table for clustered routes (where it stores what each clustered node original nodes are). Look in your SavedVariables.
Both add-ons are really great, but Routes is quite useless right now...
Or click the "Load out of Date addons" checkbox, you know. It's there so you don't actually have to edit the TOC, so you can actually know which addons are potentially broken/outdated.