Thread Tools Display Modes
Today, 02:51 AM   #1
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 30
Is it possible to change the list of addons on porting without extra reloadui?

Considering that the process of porting to a new location itself involves the loading of the UI, would it be possible to specify a different set of addons than the current ones before porting and have the game load this new set of addons during the porting? It's like wizard's wardrobe, except it applies to addons.

I haven't seen similar functionality implemented in addons so far, so I'm guessing there might be some technical limitation preventing the game from doing this. But I'd still like to hopefully learn something about this if anyone can provide information about it.
  Reply With Quote
Today, 02:57 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,143
I think it should be possible as changing addons can be done via keybinds or slash commands too.
And a zone change reloads the UI so it "should" apply the addons.
The question is where to hook code (like the wayshrine teleport might not be hookable but API function that is used to tp to a wayshrine nodeIndex should do) to apply the new addons "prior to porting".

I could try to add that to my AddonSelector addon (I recently added "Change addon pack on logout" feature there).
  Reply With Quote
Today, 03:09 AM   #3
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 30
Originally Posted by Baertram View Post
I think it should be possible as changing addons can be done via keybinds or slash commands too.
And a zone change reloads the UI so it "should" apply the addons.
The question is where to hook code (like the wayshrine teleport might not be hookable but API function that is used to tp to a wayshrine nodeIndex should do) to apply the new addons "prior to porting".

I could try to add that to my AddonSelector addon (I recently added "Change addon pack on logout" feature there).
That's great Beartram You're always my go-to people when it comes to in-game addon management.
  Reply With Quote
Today, 04:30 AM   #4
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 91
Are you sure that a zone change reloads the ui in the same way the "reloading" command does?

Because that would mean all the init function tied to the "on addon loaded" event would fire, which they do not afaik.

Or did I missunderstand you?
  Reply With Quote
Today, 04:53 AM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,595
A zone change does not reload the Lua VM, so you cannot change your addons there. In order to change which addons are loaded you need to restart Lua, which only happens on login or when using ReloadUI.
  Reply With Quote
Today, 05:40 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,143
Okay, so it would need to be a zone change -> set flag, event_player_activated -> check for flag and if true: change addons + reloadui then to achieve addons "to change at zone change" (workaroud).
A direct change w/o the extra reloadui would not be possible.

Thanks for the info

Last edited by Baertram : Today at 05:43 AM.
  Reply With Quote
Today, 06:07 AM   #7
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 30
It looks like this is the answer. Even though the feature I looked for couldn't be implemented, I'm glad you guys helped me figure out the reasons why it couldn't be done. Thanks
  Reply With Quote
Today, 06:18 AM   #8
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,143
Are you still interested into having such a feature in "AddonSelector"?
I could add that workaround then.
  Reply With Quote
Today, 06:41 AM   #9
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 30
Originally Posted by Baertram View Post
Are you still interested into having such a feature in "AddonSelector"?
I could add that workaround then.
If this workaround does work, I'd love to see it come to life. I appreciate it and am very grateful if you'd do that.
  Reply With Quote
Today, 07:18 AM   #10
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,143
Okay, UI would be:
In AddonSelector's "Saved packs" dropdown -> submenu (if enabled) or context menu -> choose the pack to load at a zone change via a checkbox.
Only 1 pack can be selected.
There is no dependency on zones so it would load on each zone change -> I do not plan to enable any zoneID dependencies here! like a dropdown of all zones and you choose that this pack only load if this particular zone was switched to. Maybe one can do add such a feature in the future then.

Should that only happen once after enabling the checkbox, so after zone was switched pack loads and then checkbox is off automatically again?
A slash command to enable that would be helping then I guess so you do not have to open the Addon manager each time.

Or should tha "load pack on zone switch" stay enabled all time until you disable the checkbox again?
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Is it possible to change the list of addons on porting without extra reloadui?


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