So there are two problems to be solved. Lets take a quest: Missing in the Ghostlands, given by “Magistrix Landra Dawnstrider” and turned into “Courier Dawnstrider”.
Now each of these NPC’s has a unique ID (16210 and 16183) just like the quest is uniquely identified by its ID (9144).
Now in German, the quest is called Verschollen in den Geisterlanden and the NPCs are “Magistrix Landra Morgenwandler” and “Kurier Morgenwandler” respectively.
Now if you know a little bit of English, you might be able to guess that Dawnstrider and Morgenwandler are direct transliterations, but let me assure you that some of the names do not have such a direct mapping.
So what to do? Well, we could try Just In Time Localization. What the heck is that? Well, Blizzard does not supply an API that maps NPC ids to the localized names. However, when you select a NPC as a target, the function UnitGUID(“target”) can be used to get the GUID for the target. Buried inside the GUID is the NPC id. We can also get the name of the target with UnitName(“target”). So by adding a NPC tag to the guide steps, we can dynamically build a database of NPC/Locale mappings to names once you select a target.
Similarly, the Blizzard API’s let us ask what quests are available from an NPC via GetGossipAvailableQuests() (which returns the localized quest names) and then we can do SelectAvailableQuest(index) which fires off a QUEST_DETAIL event, which then can be used to do a GetQuestID() to get the actual ID. Now we can build the map between the quest ID and the localized names.
This, by the way, means that it may be possible to do automatic quest selection, accepting and turnin (when there are no choices to be made) and avoid most of the NPC dialogues.
So what would this new guide line look like?
A ;Missing in the Ghostlands |QID|9144|M|44.06,70.73|NPC|16210;Magistrix Landra Dawnstrider|Z|Eversong Woods|
The first semicolon in the title says “Use this quest name unless you have a better one”. The NPC id gives the desired NPC, and the string after the semicolon gives the name to use until you know better. Since no N text was given, we would automatically generate “Von Magistrix Landra Morgenwandler” and “Um Magistrix Landra Morgenwandler” and basically just keep a short “To/From” dictionary for the client languages.
A step with objectives would look like:
C ;Investigate the Amani Catacombs|QID|9193|S|NC|U|22755|QO|1;Mummified Troll Remains Burned: 10/10|M|62.92,32.46|Z|Amani Catacombs|N|Burn the Troll remains as you go.|
Again, the title would be substituted with the name gathered from the A step. The two part objective says: look up the first objective and use the completion from GetQuestLogLeaderBoard() instead of the literal string. The text is really more documentation and a check in the english client to catch Blizzard if they change the objective order.
¿What do folks think?