1. #1

    Fixing AlphaMap for 4.1 (help needed!)

    Fixing AlphaMap for 4.1

    This thread is about discussion to fix the Addon AlphaMap3 for WoW 4.1. I suspect
    the author has gone inactive (at least I could not manage to contact him) and this thread
    so far discusses what I already fixed myselves (getting the Addon partially working again).
    I am looking for help to get the remaining problems fixed.

    You can also reach me at tirionareonwe@gmail.com, if you are interested to help working
    on this. A contact to the original authors of AlphaMap3 also would be great!

    Thanks to all in advance!

    1. The lua Errors

    This is the trivial part. In the File AlphaMap3\AlphaMap3.lua are two occurences of

    Code:
    for i = 1, NUM_WORLDMAP_DETAIL_TILES, 1 do
    Both have to be changed into

    Code:
    for i = 1, GetNumberOfDetailTiles(), 1 do
    After this change AlphaMap "principially" runs again.

    2. The problem with TomTom\GetMapFile()

    Currently AlphaMap3 uses (if TomTom is found installed) a method called GetMapFile().
    The most recent version of TomTom does no longer support this method. Principially a
    bugfix *would* be to just include the code part from old TomTom into AlphaMap3.lua.

    Like including the following lines before

    Code:
    function AM_DrawTomToms(cont, zone)
    in AlphaMap\AlphaMap3.lua:

    Code:
    do
      local continentMapFile = {
            [WORLDMAP_COSMIC_ID] = "Cosmic", -- That constant is -1
            [0] = "World",
            [1] = "Kalimdor",
            [2] = "Azeroth",
            [3] = "Expansion01",
            [4] = "Northrend",
            [5] = "TheMaelstromContinent",
        }
    local mapCZtoFile = {}
            _G.mc = mapCZtoFile
        local reverseMapFileC = {}
        local reverseMapFileZ = {}
    
        for cid, zlist in pairs{GetMapContinents()} do
            for zid, zname in pairs{GetMapZones(cid)} do
                SetMapZoom(cid, zid)
                local mapFile = GetMapInfo()
                reverseMapFileC[mapFile] = cid
                reverseMapFileZ[mapFile] = zid
                mapCZtoFile[cid] = mapCZtoFile[cid] or {}
                mapCZtoFile[cid][zid] = mapCZtoFile[cid][zid] or {}
                mapCZtoFile[cid][zid] = mapFile
            end
        end
    
        for cid, mapFile in pairs(continentMapFile) do
            reverseMapFileC[mapFile] = cid
            reverseMapFileZ[mapFile] = 0
            mapCZtoFile[cid] = mapCZtoFile[cid] or {}
            mapCZtoFile[cid][0] = mapCZtoFile[cid][0] or {}
            mapCZtoFile[cid][0] = mapFile
        end
    
        function GetMapFile(C, Z)
            if not C or not Z then return end
            local c = mapCZtoFile[C]
            if c then
                return c[Z]
            end
        end
        function GetCZ(mapFile)
            return reverseMapFileC[mapFile], reverseMapFileZ[mapFile]
        end
    end
    The problem: This does not throw anymore lua errors, *but* it does not work either (see below).

    3. The Problem with recent TomTom

    On this problem I did not find a solution yet. If I use the "old TomTom" and am for example in Stormwind and then use the Selector to select the map of IronForge, I get the following code called *3* times:

    Code:
    		if ( AlphaMapFrame:IsVisible() ) then
    			-- Suppress map changes caused by background Blizz map updates when trying to view instances... by re-passing the instance data
    			AlphaMapFrame_Update(amAlphaMapMap); 
    		end
    On the first call GetCurrentMapZone() is 14 -"Ironforge", on the second it is 26 - "Stormwind", on the third it is 14 - "Ironforge" again and everything is fine.

    Now if I use the NEW TomTom, a FOURTH call happens, which gives a GetCurrentMapZone() of
    "Stormwind" (or 26). And the map switches back to Stormwind. I noticed this only seems to happen in capital cities, outside it is fine.

    This code seems to be related to a WORLD_MAP_UPDATE event which WoW regularly triggers.
    AlphaMap as far as I understand uses this to refresh it's map (and "skips" events, if the user-selected mapchange would be overwritten by the "current" map). This skipping seems to no longer work if the most recent TomTom is installed. By introducing debug output I found out that
    the

    Code:
    if ( AlphaMapFrame:IsVisible() ) then
    in the above code snippet is entered a FOURTH TIME in case of the new TomTom, while the code piece is REACHED, but RETURNS FALSE (so is NOT entered) for the old version. I suspect
    the whole thing has something to do with

    Code:
    AM_WorldMapSelected
    in the AlphaMap code and especially with this code

    Code:
    		if ( ( inBG ) or ( newMapFileName ~= prvMapFileName ) ) then
    			if ( not inBG ) then
    				AML.AM_ClearHighlights();
    			end
    			prvMapFileName = newMapFileName;
    			if ( not AM_WorldMapSelected ) then
    				currentArea = newMapFileName;
    			end
    		end
    in the AlphaMapFrame_OnEvent which I suspect is the "skipping code" for the event. But I cannot
    proof it, and do not understand the AlphaMap event code fully. Another option would be changes in how WoW handles the WORLD_MAP_UPDATE (but then it would be strange how this is influenced by the TomTom versions).

    Any help/suggestions appreciated

    4. The problem with QuestHelper2

    If I - while inside a major city only !!!!!!!!!! - switch to a different map (some work, though not the one of another major city... switching in Stormwind to the Stranglethorn map for example works, despite problem 3) and mouseover a QuestHelper2 POI. You will notice the code SPAMMING
    WORLD_MAP_UPDATE events. The context sensitive menu appears, to TomTom to the quest
    location, but (!) is in a split-second overwritten by AlphaMap map refresh. This did not happen
    before (I suspect a change in WORLD_MAP_UPDATE handling in WoW 4.1). This happens
    no matter which TomTom version you have installed.

    Interesting also, that for example if instead of sitting in Stormwind you sit in Zul'Gurrub, the
    context sensitive menu appears just fine, with no extra WORLD_MAP_UPDATE spamming.
    So it seems this is only in the main cities.

    I did not fully understand this problem and could not find out anything more. I also found that
    if I changed the timeout in AlphaMapFrame_OnEvent()

    Code:
    		local t = GetTime();
    		if ( ( t - AML.multiTimer ) > 0.025 ) then
    			AML.multiCounter = 0;
    			AML.multiTimer = t;
    		else
    			AML.multiCounter = AML.multiCounter + 1;
    			if ( AML.multiCounter > 28 ) then
    				return;
    			end
    		end
    from 0.025 to 3, I would get a "stable" display of the context sensitive menu. But 3 is too big,
    as then if I switched a map manually the old map might still be displayed, so this is no solution
    A different mechanism would be needed to exclude the spamming.

    MagicSN
    Last edited by MagicSN; 2011-05-02 at 01:59 PM.

  2. #2
    Deleted
    Try using some [code] tags in there.

  3. #3
    Quote Originally Posted by Treeston View Post
    Try using some [code] tags in there.
    Okay, edited my post to use code tags.

  4. #4
    Quote Originally Posted by MagicSN View Post
    Okay, edited my post to use code tags.
    Just for updated info: Another player looked further into it and actually managed to fix most of the issues.
    A fan update is to be expected soon (more info: Check the comments on AlphaMap on Curse).

  5. #5
    Update: Problem "3." still happens with his version. Did not yet check on "4.". Problems "1." and "2." are fixed.

  6. #6
    Deleted
    Hi just poking in to let you know I am now aware of this thread I would've hoped you'd have had some success in reaching the author on curse, as it is we might have to create a fan-update somewhere else Also, I have no clue how to manage the versioning of the plugin.
    I'm willing to bet issue 4 is still very much an issue! Since I never really switch maps inside alphamaps I wasn't aware of issue 3 though! But I'll try and see if I find some time over the weekend to figure out what's going on.

  7. #7
    Quote Originally Posted by Windgazer View Post
    Hi just poking in to let you know I am now aware of this thread I would've hoped you'd have had some success in reaching the author on curse, as it is we might have to create a fan-update somewhere else Also, I have no clue how to manage the versioning of the plugin.
    I'm willing to bet issue 4 is still very much an issue! Since I never really switch maps inside alphamaps I wasn't aware of issue 3 though! But I'll try and see if I find some time over the weekend to figure out what's going on.
    As to issue 3, I actually think it exists since a very long time. Probably even pre-4.1 (it does not exist with old TomTom or with *no* TomTom installed). I think it might be related to Astrolab versions (newer TomTom use newer versions there), but not sure. And switching maps is something at least I
    regularly did.

    As to issue 4, it might also make sense to sometimes in the future support other questing-Addons. I am especially thinking of QuestHelperLite and WoW-Pro there. QuestHelper2 is *I think* no longer in development currently.

    And yes, the original author does not react, I had tried to reach him also some while ago. In worst case the fan-update needed to be uploaded at a several place. I would also recommend uploading to wowinterface as well, asides from Curse. Well aynways, before that some work is needed.

  8. #8
    Deleted
    Quote Originally Posted by MagicSN View Post
    As to issue 3, I actually think it exists since a very long time. Probably even pre-4.1 (it does not exist with old TomTom or with *no* TomTom installed). I think it might be related to Astrolab versions (newer TomTom use newer versions there), but not sure. And switching maps is something at least I
    regularly did.
    Can you pls make sure that you've set your "Map Update Mode" to "Paused" when trying to switch maps? See Ηττρ;//cl.ly/3Y2h1F3i2G1H1J252x21 for screenshot of the 'red' button and helper text (sorry for the greek letters, I'm not yet allowed to post urls)

    I'm not quite sure if this is the solution, but for me the map-selector works just fine... Using my experimental Alpha-Maps3 and TomTom 40100-1.3.0 I do not recall if the "Map Update Mode" is a new feature, but it has three settings. Default is "Play" in which it follows standard WoW map-updates. "Paused" stops the map from updating, this allows you to manually select maps. "Player Tracking" Selects based on where you are, not quite sure why this mode exists though

    Quote Originally Posted by MagicSN View Post
    As to issue 4, it might also make sense to sometimes in the future support other questing-Addons. I am especially thinking of QuestHelperLite and WoW-Pro there. QuestHelper2 is *I think* no longer in development currently.
    I was only mildly curious about QH2 integration since it doesn't make sense to me to keep developing a plugin such as that now that WoW has built-on quest-tracking. However, supporting the other two plugins instead sounds like a plan! For the short term I will have a look at it to see if there's an easy fix for the current bug though.

    Quote Originally Posted by MagicSN View Post
    And yes, the original author does not react, I had tried to reach him also some while ago. In worst case the fan-update needed to be uploaded at a several place. I would also recommend uploading to wowinterface as well, asides from Curse. Well aynways, before that some work is needed.
    Without 'endorsement' from the original author I have no clue as to the licensing of the plugin. I'd prefer posting it somewhere where WowMatrix can pick it up, I don't mind releasing it on multiple sites though, as long as the license allows for it. However, first we'll need to get a stable version again and second I'll need to learn how to manage the versioning!

  9. #9
    Quote Originally Posted by Windgazer View Post
    Can you pls make sure that you've set your "Map Update Mode" to "Paused" when trying to switch maps? See Ηττρ;//cl.ly/3Y2h1F3i2G1H1J252x21 for screenshot of the 'red' button and helper text (sorry for the greek letters, I'm not yet allowed to post urls)
    I did not have it in Pause mode. But with the "old" TomTom this was actually not needed. Sure it sounds like a workaround. How does "Pause mode" behave if you leave the zone?

    With the "old" TomTom it changes when you leave the zone (with Pause NOT enabled) and also if you switch the map while not leaving the zone. It has something to do with the WORLD_MAP_UPDATE events, which behave differently with the old TomTom (less of them arrive on switching the AlphaMap map).

    I was only mildly curious about QH2 integration since it doesn't make sense to me to keep developing a plugin such as that now that WoW has built-on quest-tracking. However, supporting the other two plugins instead sounds like a plan! For the short term I will have a look at it to see if there's an easy fix for the current bug though.
    Those addons are more powerful than the internal integration of WoW. For example the "Ant Trails" and the automatic arrow pointing to the next quest is something missing to the internal features. Or even, how in the case of WoW-Pro, that it tries to generate an "optimal route" between quests (pointing you with the arrow even to where you need to PICK UP the next quest which you currently do not have).

    Without 'endorsement' from the original author I have no clue as to the licensing of the plugin. I'd prefer posting it somewhere where WowMatrix can pick it up, I don't mind releasing it on multiple sites though, as long as the license allows for it. However, first we'll need to get a stable version again and second I'll need to learn how to manage the versioning!
    Okay, true.

  10. #10
    Hello!

    Ok, I tried it out. Actually it seems to work perfectly in this pause mode. It even changes map if you move across map boundaries.

    So it seems to work just how in the other mode with the old TomTom.

    Best regards,
    MagicSN

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •