How to: Find mapIDs in-game #1


  • New
  • Task
Open
Assigned to valdarix_games
  • MrFIXlT created this issue Jul 10, 2013

    What is the task?
    With the code changes in GatherNow r43 and later the recommended gather zones are no longer hardcoded literal strings.
    Instead they are dynamically produced by a function that takes as input one or more mapIDs and returns a constructed string appropriate for the player's client.
    Each localized zone name is also stored to the addon saved variables so subsequent queries for the same zone only have to do a table lookup.

    Please provide any additional information below.
    Following is a step by step guide for the addon author(s) on how to find the mapID to pass to the constructor function for future reference.

    1. Open the in-game world map.
    2. From the continent dropdown select the continent where the zone you're interested in is located (eg. "Kalimdor")
    3. From the zone dropdown select the zone you're interested in (eg. "Darkshore")
    4. Run this macro in the command-line
      /run local id=GetCurrentMapAreaID();print(("%s:%d"):format(GetMapNameByID(id),GetCurrentMapAreaID()))
      
    5. This will print in your chatframe a "zoneName:mapID" (in our example "Darkshore:42")
    6. Repeat this process for any other zones you want to add to the zone recommendation for a particular resource. It is recommended to document the IDs someplace so you don't have to repeat the process each time if you've already looked up the zone before.

    Now when you have the mapIDs you need you only have to use them with the constructor function to get back the localized zone recommendation text.

    Example
    Using the current constructor function with some mapIDs

    WTN:GetRecommendedAreas(39,36,35,30,27)
    

    will return

    Westfall (10-15)
    Redridge Mountains (15-20)
    Loch Modan (10-20)
    Elwynn Forest (1-10)
    Dun Morogh (1-10)
    

    on a enGB client and

    Westfall (10-15)
    Rotkammgebirge (15-20)
    Loch Modan (10-20)
    Wald von Elwynn (1-10)
    Dun Morogh (1-10)
    

    on a deDE client.

  • MrFIXlT added the tags New Task Jul 10, 2013
  • MrFIXlT posted a comment Jul 14, 2013

    While the macro above is a good way to lookup a single zone I also added a developer utility in the addon itself that can do a bulk export of map names and IDs.

    I'm also attaching that export here updated up to 5.4 (build 171169)

    It can be searched as plaintext with a text editor or imported to a spreadsheet application (googledocs will work if a desktop application isn't available) to have sorting options and such.


    Edited Jul 14, 2013

To post a comment, please login or register a new account.