WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Addons - Single Source for Classic and current? (https://www.wowinterface.com/forums/showthread.php?t=57200)

bsmorgan 06-14-19 07:31 AM

Addons - Single Source for Classic and current?
 
Is it possible for an addon to be written such that the same source files can be used for Classic and current?

If a current addon uses ACE3, will it be possible to port that addon to Classic (i.e. are the ACE3 libraries being ported)?

MooreaTv 06-15-19 01:50 PM

yes many addons just work on both and many that do not just need a couple of if

SDPhantom 06-15-19 06:40 PM

Depends on what the addon does. For example, an addon tracking calendar events or the collections system won't work in classic since those systems don't exist.

Kanegasi 06-15-19 06:59 PM

Most addons should work just fine, especially addon frameworks like Ace3. Classic has the exact same environment as live does, with the only API differences being the absence of objects that pertain to live-only stuff like banks and the calendar. Classic's Lua environment was initially forked from Legion's environment and from what I understand will stay parallel with live. It is not the actual environment from vanilla.

SDPhantom 06-15-19 09:58 PM

Quote:

Originally Posted by Kanegasi (Post 332378)
Classic's Lua environment was initially forked from Legion's environment and from what I understand will stay parallel with live.

It's actually BfA 8.0. As an example, the map system changed significantly between Legion and BfA.

bsmorgan 06-16-19 06:48 AM

So it sounds like a tradeskill addon like Skillet will work with minimal changes that can all be determined at runtime.

bsmorgan 06-19-19 10:09 PM

I've found one "gotcha" with single source, the "## Interface: " in the .toc. Classic should be "11302" and Retail/Live is currently "80100". Anyone have a brilliant idea how to solve this one?

Fizzlemizz 06-19-19 10:28 PM

GetBuildInfo() returns 1.13.2.xxx for classic so :

Lua Code:
  1. local BuildInfo = GetBuildInfo()
  2. BuildInfo = tonumber(string.sub(BuildInfo, 1, 2))
  3. if BuildInfo < 2 then
  4.     print("Classic")
  5. end

Xrystal 06-19-19 10:33 PM

Quote:

Originally Posted by bsmorgan (Post 332429)
I've found one "gotcha" with single source, the "## Interface: " in the .toc. Classic should be "11302" and Retail/Live is currently "80100". Anyone have a brilliant idea how to solve this one?

Well, I just ran mine with 8.0 Interface on Classic with no apparent issues. I just ticked the out of date box. One way you could get around it is to have 2 versions of the file and upload the addon twice with each one having the correct TOC file activated. We could utilise 'Other Files' to provide Classic versions for addons that you already have for live. For now I have gone with separate addon pages just in case it doesn't work out for some of the addons. Plus, you can track the downloads per addon that way but no using the 'Other Files' way.

Fizzlemizz 06-19-19 10:47 PM

Last I checked you couldn't run with ## Interface: 11302 under BfA because it assumed it was too old to even be "out-of-date".

Xrystal 06-20-19 04:08 AM

Quote:

Originally Posted by Fizzlemizz (Post 332433)
Last I checked you couldn't run with ## Interface: 11302 under BfA because it assumed it was too old to even be "out-of-date".

Hmm, didn't try that route, I have 80100 on BFA and used that on Classic and it accepted 'out of date' usage on the addon list.

bsmorgan 06-20-19 06:34 AM

I solved the issue of a conditional variable for which version am I running under but it looks like the issue of a "conditional" .toc line hasn't been solved yet. It may be awhile before I'm ready but my temporary solution will be to build retail using the existing WoWAce SVN repository and tools and then substitute the .toc file in the .zip before uploading it here.

I do have another problem all you "wizards" can help me with :D

I'm not getting any lua error output when my addon gets an error. I can't find the option to turn on Blizzard's error output so either I need help with that or I need to know which error reporting addons work on Classic.

bsmorgan 06-20-19 09:03 AM

I think we can scratch Skillet (and most other TradeSkill addons) from the single source list as all the C_TradeSkillUI. functions are gone.

I'll see if I can find the version of Skillet before that change happened and if I can find it, how badly it breaks on the current classic build, but I'm not holding my breath.

Xrystal 06-20-19 10:24 AM

Quote:

Originally Posted by bsmorgan (Post 332440)
I think we can scratch Skillet (and most other TradeSkill addons) from the single source list as all the C_TradeSkillUI. functions are gone.

I'll see if I can find the version of Skillet before that change happened and if I can find it, how badly it breaks on the current classic build, but I'm not holding my breath.

Couldn't you create a local function that is set to either the C_TradeSkill functions or the Classic equivalent / or nil based on the setup ? It would then simply be the case of adding an if nil test in front of the new function call.

Xrystal 06-20-19 10:25 AM

Quote:

Originally Posted by bsmorgan (Post 332435)
I solved the issue of a conditional variable for which version am I running under but it looks like the issue of a "conditional" .toc line hasn't been solved yet. It may be awhile before I'm ready but my temporary solution will be to build retail using the existing WoWAce SVN repository and tools and then substitute the .toc file in the .zip before uploading it here.

I do have another problem all you "wizards" can help me with :D

I'm not getting any lua error output when my addon gets an error. I can't find the option to turn on Blizzard's error output so either I need help with that or I need to know which error reporting addons work on Classic.

!Bugrabber and Bugsack work with Classic fine. I had the same problem with nUI and had to install them as I couldn't see the built in error options either.

bsmorgan 06-20-19 11:14 AM

Quote:

Originally Posted by Xrystal (Post 332441)
Couldn't you create a local function that is set to either the C_TradeSkill functions or the Classic equivalent / or nil based on the setup ? It would then simply be the case of adding an if nil test in front of the new function call.

My first attempt at this was to just remove "C_TradeSkill." and see what blew up. In numerous cases, the return values also "reverted" to an earlier time as well. I can't just change "C_TradeSkill." to "self:" because there are quite a few cases where Skillet already has a function of that name some of which do something different than the name would suggest.

I've come to the conclusion that Skillet is a Retail addon and Skillet - Classic will be a different addon with a different set of sources. This decision is supported by a comparison of:
World of Warcraft\_retail_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\
and
World of Warcraft\_classic_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\

The question now becomes, do I want to write Skillet - Classic?

Xrystal 06-20-19 12:09 PM

Quote:

Originally Posted by bsmorgan (Post 332444)
My first attempt at this was to just remove "C_TradeSkill." and see what blew up. In numerous cases, the return values also "reverted" to an earlier time as well. I can't just change "C_TradeSkill." to "self:" because there are quite a few cases where Skillet already has a function of that name some of which do something different than the name would suggest.

I've come to the conclusion that Skillet is a Retail addon and Skillet - Classic will be a different addon with a different set of sources. This decision is supported by a comparison of:
World of Warcraft\_retail_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\
and
World of Warcraft\_classic_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\

The question now becomes, do I want to write Skillet - Classic?

The way I look at it with my addons is ..

1. Do I need it ?
2. How popular is it ?
3. How time consuming will the conversion and later patches be ?
4. Is there another addon that is easier to convert and works in a similar way ?
5. Am I bored enough that I don't care what the answers are ?

My MagePorts addon passes 1(kinda) and 2 (definitely)... I am at question 3 and I really am not sure yet.. it all depends on whether I can get a similar output with different functionality.


All times are GMT -6. The time now is 05:44 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI