WorldBossTimers

WorldBossTimers

2M Downloads

Document a way to add new rares manually

dandepeched opened this issue ยท 7 comments

commented

Hi @fstenstrom , I've tried to add some rares to the addon manually and failed.
I opened BossData.lua file and added following info to the end of the tracked_bosses struct:

["Doomroller"] = {
        name = "Doomroller",
        color = "|cffe08748",
        ids = {95056},
        is_saved_fcn = function() return IsSavedDaily(39289); end,
        soundfile = Sound.SOUND_FILE_DEFAULT,
        min_respawn = MinToSec(60),
        max_respawn = MinToSec(180),
        random_spawn_time = true,
        auto_announce = true,
        map_id = 534,
        perimiter = {
            origin = {
                x = 0.47,
                y = 0.526,
            },
            radius = 0.03,
        },
    },

Did I made some mistake? Is it possible to document how to add new rares to addon manually?

commented

I see, that was the problem! Thanks for clarification :) Was able to make it work.
Here are all other rares from that zone in case you will want to add them permanently:

["Doomroller"] = {
        name = "Doomroller",
        color = "|cffe08748",
        ids = {95056},
        is_saved_fcn = function() return IsSavedDaily(39289); end,
        soundfile = Sound.SOUND_FILE_DEFAULT,
        min_respawn = MIN_RESPAWN_TANAAN,
        max_respawn = MAX_RESPAWN_TANAAN,
        random_spawn_time = true,
        auto_announce = true,
        map_id = 534,
        perimiter = {
            origin = {
                x = 0.47,
                y = 0.526,
            },
            radius = 0.03,
        },
    },
["Vengeance"] = {
        name = "Vengeance",
        color = "|cffe08748",
        ids = {95054},
        is_saved_fcn = function() return IsSavedDaily(39290); end,
        soundfile = Sound.SOUND_FILE_DEFAULT,
        min_respawn = MIN_RESPAWN_TANAAN,
        max_respawn = MAX_RESPAWN_TANAAN,
        random_spawn_time = true,
        auto_announce = true,
        map_id = 534,
        perimiter = {
            origin = {
                x = 0.326,
                y = 0.74,
            },
            radius = 0.03,
        },
    },
["Deathtalon"] = {
        name = "Deathtalon",
        color = "|cffe08748",
        ids = {95053},
        is_saved_fcn = function() return IsSavedDaily(39287); end,
        soundfile = Sound.SOUND_FILE_DEFAULT,
        min_respawn = MIN_RESPAWN_TANAAN,
        max_respawn = MAX_RESPAWN_TANAAN,
        random_spawn_time = true,
        auto_announce = true,
        map_id = 534,
        perimiter = {
            origin = {
                x = 0.23,
                y = 0.402,
            },
            radius = 0.03,
        },
    },
["Terrorfist"] = {
        name = "Terrorfist",
        color = "|cffe08748",
        ids = {95044},
        is_saved_fcn = function() return IsSavedDaily(39288); end,
        soundfile = Sound.SOUND_FILE_DEFAULT,
        min_respawn = MIN_RESPAWN_TANAAN,
        max_respawn = MAX_RESPAWN_TANAAN,
        random_spawn_time = true,
        auto_announce = true,
        map_id = 534,
        perimiter = {
            origin = {
                x = 0.134,
                y = 0.598,
            },
            radius = 0.4,  -- Big radius because NPC moves along the route
        },
    },
commented

I'm sorry, but for now I don't want to support customizations of source files (however you're of course free to modify it as you please).

For this specific case, what is it that does not work? Lua error?

commented

Timer for new mob just doesn't appear in the UI. I previously didn't work with Lua and wow plugins. Maybe need to try to debug it.

commented

I tried to insert above code and worked for me... (You need to /reload or relog for changes to source code to take affect.)

commented

I even tried to restart WoW... Did you actually killed that mob to verify?
File path with modified script - \World of Warcraft\_retail_\Interface\AddOns\WorldBossTimers\BossData.lua
In my file I have 2 differences:

  1. respawn time is located in the local MIN_RESPAWN_TANAAN = MinToSec(60); local MAX_RESPAWN_TANAAN = MinToSec(180);
  2. name parameter contains Cyrillic

I will test once again with the exact code I provided for you.

commented

Yes I did.

Locals are OK, but note that name and table key must be equal.

commented

Great!

Thanks, but I'd prefer to leave it for now. If I decide to add it in the future I know where to find it.