Thread Tools Display Modes
12-16-21, 11:11 AM   #1
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
Addon for making WOW more accessible for VI and Blind Players

Hello and thank you for taking the time to read this,

I recently began playing WOW with my fiance. I've begun to dabble with some addon creation to make my life easier because I am completely blind. With the addition of the clientside TTS api, I can have the client read out information to me, such as my level, experience, my statistical information, etc. Currently, the addon has the following functionality:
1. Statistical announcements: The client has slash commands that can be placed on the action bars and keybound to favored keys to announce experience percentage, health, power, zone, subzone, and map coordinates.
2. TTS Target Tracking: When the player's target shifts, the name is announced along with its current health percentage, every 3 seconds there on forward, the target's health will announce assuming it has changed since the last iteration. This works for both friendly and hostile entities.
3. Party Health Monitoring: Your party's health is monitored as they shift through different stages of health. Each stage is 20% of their maximum health. Four unique sounds relate to a specific party member that pans from left to right depending on their health stage.
4. QuestNavAccessThe questlog can be reviewed while the map is open, using left shift and left ctrl to navigate the list, and left alt and right alt to read out the description and objectives.

To Do:

I'd like to be able to browse my inventory. If there's a way to loop through the names of what is in my inventory, and also retrieve their information, I can use the in game slashequip command to equip the items I want. This will also help with my next task I think, which is buying and selling at merchants.
I need to be able to review my spellbook, and make it possible to bind these to keys without the use of the mouse.
A system for navigating and selecting options within gossip dialogues to generate TTS.
Construct a way to utilize the navigation system purely with the keyboard, and convert pointer and distance information into TTS.
Add more statistical information for review.
Integrate party member pets into the party health monitor


I'm unsure how much of this I will be able to manage. I am fairly new to Lua and XML after all. Any assistance would be welcome. This is just some of the most basic functionality I would need to make the game more enjoyable. As it is, I'm extremely grateful for the opportunity the WOW addon support has given me. I've always wanted to be able to play a game like this with others. Even though I can't do a lot on my own right now, it only serves to enhance the experience when playing with another person. Hopefully in the future, I can put in more functionality so I can be a more independent player. Again, thanks for reading. Download the most recent release from https://www.wowinterface.com/downloa...ss-Retail.html

Last edited by RogueEugor : 01-02-22 at 04:20 PM.
  Reply With Quote
12-17-21, 08:14 AM   #2
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
Are you playing classic or retail? This will change which API you need for the quest log and inventory.


I don't think an addon will be able to tell you where on your screen is an in-game objects, but maybe you could hook some tooltip functions to be informed when the mouse cursor is over an object that results in a tooltip?

In outdoor zones, on retail only, the new waypoint system can be used to help you get your bearings for whatever quest you are on.
  Reply With Quote
12-17-21, 09:04 AM   #3
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
I'm on retail yeah. Hmm, We haven't been using waypoints. I'll look those up and check it out. The tooltip idea is a good one. I already have something similar, when my mouse goes over a targetable item, it'll read the name out to me. Like I said though, it's pretty hit or miss. I'd have to check every part of the screen.
  Reply With Quote
12-18-21, 09:33 AM   #4
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
There is an addon (with TTS support) still in development for blind people, but it's currently only in German and only supports Classic so it might not really be that helpfulUnless you prefer us to continue giving advice on writing addons? I'm a bit amazed that someone who is completely blind can develop their own addon

Last edited by Ketho : 12-18-21 at 09:49 AM.
  Reply With Quote
12-18-21, 09:56 AM   #5
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
For the retail quest log:
There are two parts to quests: the quest log (integrated with the map) and the quest watch (right side of the screen). The quest watch shows just a few quests, and has its own functions to select which quests should be watched during normal play.

The quest log includes headers and actual quests. The headers can minimize and expand, and historically there was one header for each zone but these days its a bit more complex with different kinds of quests.
  • Use the return values from C_QuestLog.GetnumQuestLogEntries() to know how many rows are in the quest log, including collapsible headers and a number of hidden quests that are, I believe, weekly and daily zone quests from other expansions like Battle For Azeroth.
  • Use C_QuestLog.GetInfo() to get information about each row. The return value is a table. Check .isHeader to see if this index is just a header, and then .isCollapsed to find out its state. Otherwise, the other properties give details like its title, description, etcetera.
  • You can change the state of a header with ExpandQuestHeader() and CollapseQuestHeader() -- the argument is the questLogIndex, but passing 0 just expands/collapses all of them. (I think you can ignore this if you wanted to just make your own quest log frame, that you had total control over, rather than changing the state of the default one.)

Last edited by DahkCeles : 12-18-21 at 10:17 AM.
  Reply With Quote
12-18-21, 11:38 AM   #6
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
Post

Wow, that's fantastic. Thank you for explaining all of that. I can't see it, so I didn't understand what all the APIs were for. It does make a lot more sense now though.

You said that it is possible to create my own quest frame to have complete control over? I think this might be a little more what I am looking for. For the moment, I want to be able to create a table that contains all of the quests I have accepted, then retrieve the information for each of those quests, so their names, quest giver, quest description, quest objectives, quest progress, then be able to review those with either some dedicated keybindings to navigate the table, or slash commands. Later, being able to explore quests based on what zone I'm in would be handy. I'm confident I can manage the keybinding navigation stuff once I have a table of data I can manipulate that contains all my quest information. I don't really understand frames though. I thought they were UI elements? Would there be no way to get this information without creating another window on the screen?

Also, to #4, I'm aware of the German addon, but it's for classic as I understand it. It also doesn't use the built in TTS functions. Though I do plan on taking a look at it to try and see if I can come up with a better way of navigating. I've managed to set up a command that allows me to check my zone location and coordinates. I also have an idea of how I can keep track of distances covered with some audio queues, since right now there's no way to know if you're actually moving or stuck behind a rock or a wall or something without sight. Right now, I can retrieve my own corpse if I die by checking my coordinates before I release, and then retracing my way back by referencing my current coordinates. It's slow going if I'm trying to do it by myself, but it works. However, I still need to learn how the mapping functions work to develop something more efficient, and less time consuming.

Some additional functionality I've appended to the addon is the ability to track your target's health in real time. Whenever you switch to a new target, it will announce that target's name and health percentage. Every three seconds it'll announce an update of the target's health percentage if it has changed since the last time it announced. I'll be working on a way for it to keep track of your party's health as well. I think if I can manage it for parties I can manage it for raids, but baby steps.

Also, yes, please more advice.
  Reply With Quote
12-18-21, 01:43 PM   #7
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
Here's something rudimentary for a complete copy of the quest log contents, including headings and invisible content.

Each quest will be table, with the information described at Wowpedia.


Lua Code:
  1. local quests = {}
  2. local frame = CreateFrame("Frame")
  3. frame:RegisterEvent("QUEST_LOG_UPDATE")
  4. frame:SetScript("OnEvent", function(__, event)
  5.     if event == "QUEST_LOG_UPDATE" and not QuestMapFrame.ignoreQuestLogUpdate then
  6.         wipe(quests)
  7.         for i=1, C_QuestLog.GetNumQuestLogEntries() do
  8.             quests[i] = C_QuestLog.GetInfo(i)
  9.         end
  10.     end
  11. end)

Last edited by DahkCeles : 12-18-21 at 01:45 PM.
  Reply With Quote
12-18-21, 02:30 PM   #8
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
Awesome, that helps me a lot. I had this going before, but it wasn't working. I wonder if it's because I didn't have the frame stuff in. Thanks for the help. This'll keep me busy.
  Reply With Quote
12-30-21, 11:29 PM   #9
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
I tried the code presented, but it does not seem to compute. Is there something else I need to do to get this running? My addon doesn't load if I paste this in, the line breaks removed. I'm sorry if this is something obvious. I'm blind, but also new to this.
  Reply With Quote
01-01-22, 01:49 PM   #10
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
Okay! I've gotten it working. I now have an addon that can read out my currently selected quests, their descriptions, and objectives. It now keeps track of my party's health, and plays audio to alert me when their individual healths enter a different stage of health, which are divided by 20% increments. Each party member has their own audio sound that pans from left to right depending on the stage of health they have entered. It reads out my current coordinates, announces any time I change to face a direction, will read out my currently selected target's name when it changes along with their current health percentage. Every three seconds the addon will announce my target's current health percentage if it has changed since the last time it was announced. It will now announce your player statistics, health, power, level, amount of exp in a percentage value towards your next level. Obviously many of these are all tied to a slash command, which can then be placed as a macro and bound to keys.

The next system I am likely going to tackle is navigation. I need to figure out how the map pointer works, or quest pointers.

Again thank you for the awesome help!

Last edited by RogueEugor : 01-01-22 at 03:02 PM.
  Reply With Quote
01-01-22, 04:01 PM   #11
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
Here is a complete addon.

Press M to open and close the map.

While the map is open, press left-shift and left-control to go up and down the quests. It starts at the top, so you will need to use left-control to navigate to the first quest. Press tab to repeat the name and number of the quest.

While at a quest, press left-alt to hear the full description slowly, or right-alt to hear the objectives more quickly.

To be clear, you are not actually changing the game's selected quest when you use this code. It is simply navigating its own table. A more advanced version of this would probably integrate with the quest log to actually choose quests.


Lua Code:
  1. local quests = {}
  2. local questSelected = 1
  3.  
  4. local function speakText(spokenMessage, speed)
  5.     C_VoiceChat.StopSpeakingText()
  6.     C_VoiceChat.SpeakText(1, spokenMessage, Enum.VoiceTtsDestination.QueuedLocalPlayback, speed or 5, 100)
  7. end
  8.  
  9. local function readCurrentTitle()
  10.     if quests[questSelected]["isHeader"] then
  11.         speakText(questSelected .. " is a header: " .. quests[questSelected]["title"])
  12.     else
  13.         speakText(questSelected .. " is " .. quests[questSelected]["title"])
  14.     end
  15. end
  16.  
  17. local function readCurrentDescription()
  18.     if quests[questSelected]["isHeader"] then
  19.         speakText("Sorry, that is a header.")
  20.     else
  21.         speakText(quests[questSelected]["title"] .. ": " .. quests[questSelected]["description"], 2)
  22.     end
  23. end
  24.  
  25. local function readCurrentObjectives()
  26.     if quests[questSelected]["isHeader"] then
  27.         speakText("Sorry, that is a header.")
  28.     else
  29.         speakText(quests[questSelected]["title"] .. ": " .. quests[questSelected]["objectives"], 4)
  30.     end
  31. end
  32.  
  33. local function next()
  34.     if questSelected < #quests then
  35.         questSelected = questSelected + 1
  36.     else
  37.         questSelected = 1
  38.     end
  39.     readCurrentTitle()
  40. end
  41.  
  42. local function prev()
  43.     if questSelected > 1 then
  44.         questSelected = questSelected - 1
  45.     else
  46.         questSelected = #quests
  47.     end
  48.     readCurrentTitle()
  49. end
  50.  
  51. local function goto(i)
  52.     if not tonumber(i) then
  53.         i = 1
  54.     elseif i < 1 then
  55.         i = 1
  56.     elseif i > #quests then
  57.         i = #quests
  58.     end
  59.     questSelected = i
  60.     readCurrentTitle()
  61. end
  62.  
  63. local frame = CreateFrame("Frame", nil, QuestMapFrame)
  64.  
  65. frame:RegisterEvent("QUEST_LOG_UPDATE")
  66. frame:SetScript("OnEvent", function(__, event)
  67.     if event == "QUEST_LOG_UPDATE" and not QuestMapFrame.ignoreQuestLogUpdate and QuestMapFrame:IsShown() then
  68.         wipe(quests)
  69.         for i=1, C_QuestLog.GetNumQuestLogEntries() do
  70.             quests[i] = C_QuestLog.GetInfo(i)
  71.             if quests[i]["questID"] > 0 then
  72.                 quests[i]["description"], quests[i]["objectives"] = GetQuestLogQuestText(i)
  73.             end
  74.         end
  75.         if questSelected > #quests then
  76.             questSelected = 1
  77.         end
  78.         readCurrentTitle()
  79.     end
  80. end)
  81.  
  82. frame:EnableKeyboard(true)
  83. frame:SetPropagateKeyboardInput(true)
  84. frame:SetScript("OnKeyDown", function(__, key)
  85.     if key == "LSHIFT" then
  86.         prev()
  87.     elseif key == "LCTRL" then
  88.         next()
  89.     elseif key == "LALT" then
  90.         readCurrentDescription()
  91.     elseif key == "RALT" then
  92.         readCurrentObjectives()
  93.     elseif key == "TAB" then
  94.         readCurrentTitle()
  95.     end
  96. end)


Edit: I wrote mine before you edited your post.
  Reply With Quote
01-01-22, 11:44 PM   #12
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
You are too kind. While mine is working. It was lacking a lot of polish. I actually woke up itching to do some more coding to tighten it up, but you got pretty much everything I needed. I have to also thank you for showing me some of the keyboard control stuff. I was unaware. Do you have any thoughts on how to manage navigation? My initial ideas require me to be able to obtain NPC data that seems removed like coordinates. I can see those of my party members, but quest NPCs, vendors, flight masters, etc don't work with UnitPosition. Thanks again.
  Reply With Quote
01-02-22, 12:46 AM   #13
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
Position information is restricted in dungeons to prevent someone from building a bot. But in the outdoor world you can figure out your own position and that of party members.

For quest objectives, turn-ins, etcetera, there are three possible sources of information:
* The new waypoint system that came with Shadowlands
* Inferring coordinates from quest pins on the world map
* Using a third-party database addon that is pre-programmed with locations.

I am going to see if I can put something together using the middle option, and integrated with what I wrote yesterday.
  Reply With Quote
01-02-22, 08:25 AM   #14
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
I thought that might be the case. I even did some looking around for addons with this kind of data, and found some in https://www.curseforge.com/wow/addon...ting-essential There seems to be plenty of data regarding NPCs. I do not know if it stores coordinate data or not though. Additionally, it seems to contain data from across all of the expansions. I think it would be very useful for making this type of addon. It's just a lot to wade through.

I think if I can combine this data with the waypoint APIs then I'll be able to navigate independently. If they have some way to filter the list of NPCs by their zone, it should be possible to produce a simple UI that lists the different NPCs in the player's area that they then select from. That being said, I'm not sure if the pointer has any APIs that return directional data, or something that can be turned into a textual readout for the TTS. Thank you for any and all assistance.

Last edited by RogueEugor : 01-02-22 at 10:41 AM.
  Reply With Quote
01-02-22, 04:19 PM   #15
RogueEugor
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 9
I uploaded the addon in its entirety. It should show up under my profile. I hope. If not the link will be in the original post.
__________________
To go is death. To stay is death.
  Reply With Quote
03-09-22, 01:55 AM   #16
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
I just saw this post on the German WoW-Forums:
https://eu.forums.blizzard.com/de/wo...enspiel/183664

Apparently there is a group working on an addon similar to yours. Maybe you want to get in touch with them?

This is their Discord channel: https://discord.gg/yEMQWwxJFp
And here are some demo videos of the addon (in German): https://www.youtube.com/channel/UCXk...Q6-BkH-XuBQOCQ
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Addon for making WOW more accessible for VI and Blind Players

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off