with the new client based toc filenames ive run into an issue in that as my mod will run on any client i just use the default toc filename, but when its in TBC and another mod has a TBC specific toc file i have to use both (or all) variants in the reqdeps and optdepts for it to load them.
eg; ## OptionalDeps: somemod, somemod-TBC
IsAddonLoaded( ) also requires all name variants to be checked, eg; in TBC i cant just check IsAddonLoaded( "somemod" ) as it returns false due to its name in TBC being somemod-TBC
would it be possible to have the backend logic “fixed” so that a mod has the same name across all clients and does not get the -Classic or -TBC extension based of the toc filename (i havent checked -Mainline) in those clients?
Wouldn’t it be simpler to simply clone any releases to each version with a version tag at the end? I think there’s going to be a vanishingly small number of addons that work on all versions of the game.
I have 3 addons that use multiple tocs with a LOD config. addons. They have no problems with ## RequiredDeps: xxx, IsAddonLoaded(xxxConfig), LoadAddon(xxxConfig) and not requiring the toc -client version addition.
Maybe I misunderstood the problem but this would seem to make your addon ideal for mutiple tocs itself. It would mean your addon wouldn’t be “out-of-date” as each toc could have the current ## Interface: entry for each client.
If you saying another addon has a version specific name then you can list the matching addon name with the ## RequiredDeps: in your version specific .toc.
If the other addons name is client specific, your code can check IsAddonLoaded for a name dependant on the running WoW client version:
if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then
if IsAddonLoaded("addonTBC") then
...
end
elseif WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
if IsAddonLoaded("addonClassic") then
...
end
else -- Retail
if IsAddonLoaded("addon") then
...
end
end
1 Like
sorry, ive just realised that the author actually changed the mods folder name for TBC to somemod-TBC so its not actually using the new format but sort of also is at the same time. their Classic Era variant has the base toc name and folder of somemod.
i didnt notice the difference as wowup (and probably overwolf as well) shows the name/label, not the folder name it lives in.
it would except the only difference between them would be the actual toc version listed in there, and my mod has 3 other “modules” that show as addons so that gives me a total of 12 toc files that i have to remember to keep up to to date.
considering ive played this game for 15 years and have always re-enabled that every upgrade due to the simple fact that at least one of the mods i use is always out of date (typically because it doesnt need to be updated), i expect thats not uncommon and practically no one cares if their mods are out of date, just so long as they work.
if i could manage the three codestreams both separately and together in my head as well as on disk i might consider splitting it that way but at the moment its simpler for me to maintain it as a single codestream and just tag it three times in curse (one for each client) so it downloads properly.
yeah, currently i just check for both of its “names” as i dont need to break that part of my code down based on client (not yet anyway)