Thread Tools Display Modes
07/15/15, 04:22 PM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
[implemented] api version variable in addon manifest

I was just wondering if it would be possible to add a new variable for the addon manifest so that we can make the addon compatible for both api versions on a major patch without having to clutter the code with
Lua Code:
  1. if(GetAPIVersion() == 100011) then
  2. --old
  3. else
  4. --new
  5. end

Something like
Code:
Startup_${apiversion}.lua
which then loads either Startup_100011.lua or Startup_100012.lua depending on the api version.
 
07/15/15, 11:12 PM   #2
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Originally Posted by sirinsidiator View Post
I was just wondering if it would be possible to add a new variable for the addon manifest so that we can make the addon compatible for both api versions on a major patch without having to clutter the code with
Lua Code:
  1. if(GetAPIVersion() == 100011) then
  2. --old
  3. else
  4. --new
  5. end

Something like
Code:
Startup_${apiversion}.lua
which then loads either Startup_100011.lua or Startup_100012.lua depending on the api version.
Well, api version never goes backwards on live, you would have to remove the redundant file with the next add-on update anyway. I see no problems having add-on tested and prepared on PTS and updated once patch went live.
 
07/16/15, 02:28 AM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
Of course you will remove the old version once it is no longer necessary, but there is also the delay in the update between EU and NA server to think about. That way you could easily upload a version that is compatible with both APIs and make the transition as smooth as can be.
Also it can't hurt to have the addon ready and published for the PTS so people can test your changes beforehand and instead of making a separate addon I would prefer to just have a version that is compatible with both.

Even without this feature I will find a way to do it, but it would be much cleaner this way, because no unnecessary code is loaded.
 
07/16/15, 09:51 AM   #4
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Originally Posted by sirinsidiator View Post
Also it can't hurt to have the addon ready and published for the PTS so people can test your changes beforehand and instead of making a separate addon
Stop, stop! I can only become so erect. This would be awesome
 
07/17/15, 09:24 AM   #5
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
I went ahead and added an {APIVersion} variable that is substituted with the current version in any paths listed in the addon ToC. I'll try to make a case for this for the next update (2.1).
 
07/17/15, 12:47 PM   #6
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
Thank you very much! That will come in really handy in the future.
Will this go into one of the next incremental patches, or what else will the variable resolve to in the current live version in case it only makes it into update 2.1?

And just out of curiosity, are there any other substitutions besides ${language}?
 

ESOUI » Developer Discussions » Wish List » [implemented] api version variable in addon manifest


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off