Thread Tools Display Modes
01-02-17, 10:05 PM   #1
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Handling Gossip Options in a Locale-friendly way

Someone requested that I add a small amount of automation to one of my addons (auto-accept teleports in Darkmoon Faire in MuffinDarkmoonHelper).

I have it working, but it feels a bit fragile to me because I'm just choosing the first gossip option, which is correct NOW, but could easily change in the future. I could inspect the text and compare it to what I expect, but that has 2 issues:
1) it will only work for engish players without a lot of effort to get localized string together
2) if Blizzard tweaks the wording, it also breaks.

Clearly the strings are already localized in the client. I know the extracted UI files used to have a Global Strings file, but it seems to have been removed. Is there are way to find a global variable that holds the strings I'm interested in?
  Reply With Quote
01-02-17, 10:23 PM   #2
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
I tried scanning all of the strings in _G for the substring I wanted, but I came up empty.
Code:
/run local i=0;for k,v in pairs(_G) do if(type(v) == "string" and string.find(v,"Teleport me")) then i=i+1; print(k,v); end; if (i > 5) then break; end; end;
  Reply With Quote
01-02-17, 10:37 PM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,237
Global strings and other extracts are found here: https://www.townlong-yak.com/framexm...balStrings.lua

You can use the arrows at the top to go back versions, like 7.0.3 and forward to 7.1.5.
  Reply With Quote
01-02-17, 11:04 PM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
There are just a few mobs that have that option, what I do in QuickQuest is filter the npc itself, then select whatever the first gossip option is:
https://github.com/p3lim-wow/QuickQu....lua#L181-L183

For the ones that cost money (such as the one at the beach) I use the following:
https://github.com/p3lim-wow/QuickQu....lua#L201-L213
Same principle.

Keep in mind, QuickQuest will auto-click any single gossip option from any npc, so you need to do some testing and not implement this blindly.

Last edited by p3lim : 01-02-17 at 11:09 PM.
  Reply With Quote
01-02-17, 11:31 PM   #5
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Originally Posted by myrroddin View Post
Global strings and other extracts are found here: https://www.townlong-yak.com/framexm...balStrings.lua

You can use the arrows at the top to go back versions, like 7.0.3 and forward to 7.1.5.
It looks like that's not going to help me with this; the gossip text isn't in there. But I'm bookmarking that for future reference. Thanks.
  Reply With Quote
01-02-17, 11:32 PM   #6
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Originally Posted by p3lim View Post
There are just a few mobs that have that option, what I do in QuickQuest is filter the npc itself, then select whatever the first gossip option is:
https://github.com/p3lim-wow/QuickQu....lua#L181-L183

For the ones that cost money (such as the one at the beach) I use the following:
https://github.com/p3lim-wow/QuickQu....lua#L201-L213
Same principle.

Keep in mind, QuickQuest will auto-click any single gossip option from any npc, so you need to do some testing and not implement this blindly.
Yeah, I've got the NPC check in, I'd just really like a way to verify that Gossip Option 1 is what I think it is. I'm starting to think I won't be able to do that.
  Reply With Quote
01-03-17, 03:58 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
What *does* option 1 say?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-03-17, 05:45 PM   #8
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Originally Posted by Seerah View Post
What *does* option 1 say?
In this case "Teleport me to the cannon."
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Handling Gossip Options in a Locale-friendly way

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