Download
(5 Kb)
Download
Updated: 07/11/21 06:31 PM
Pictures
File Info
Compatibility:
Blackwood (7.0.5)
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Updated:07/11/21 06:31 PM
Created:02/10/21 08:05 PM
Monthly downloads:44
Total downloads:3,430
Favorites:4
MD5:
Link Pet to Mount
Version: 1.3.2
by: ShadowMau [More]
LinkPetToMount

Requires: LibAddonMenu-2

Build a list of links between pets and mounts. When the player mounts, a random mount is used and the linked pet is summoned.

Creates a list of your unlocked mounts and pets then allows you to create links between a pet to a mount. This information is saved for each character so each character can have a different list.

If you have two or more links saved to favorites, it will randomly switch to another mount, and when you mount again, the appropriate linked pet is summoned three seconds later. When you dismount, the pet remains until you mount again and the linked pet for the new mount is summoned.

If you have no links saved, the in-game system is used. If you have only one link created, only that one mount / pet combination is used (basically like the in-game system).

Rapid mount changes will trigger a cooldown error resulting in no pet being summoned or the mount not being changed. Just dismount, wait a few seconds, and mount again. This addon may collide with FavoriteMount and other addons that deal with mounts or pets.


Check out my other addons listed in the top box.
1.3.2 (07-11-2021)
  • API bump to 100035 Blackwood

1.3.1 (03-27-2021)
  • Added in a check for if the user is currently mounted in case of rapid dismount / mount before the mount switch occurs.

1.3.0 (03-12-2021)
  • Changed to using EVENT to detect if collectible is on cooldown
  • API changed to 100034 "Flames of Ambition"

1.2.0 (2021-02-14)
  • Major overhaul of the settings menu

1.1.1 (2021-02-11)
  • Minor change to the settings menu layout
  • Changed how unlocked mount and pet list refresh is triggered
  • Added more error checking
  • Added checking for collectible cooldown to prevent errors

1.0.1 (2021-02-11)
  • Added in support for multi-server saved variables - Thank you Baertram
  • Overhaul of the handling of the case where there are no saved links, or only one saved link.
  • This update may reset the saved variables

1.0.0 (2021-02-10)
  • Initial release
Optional Files (0)


Archived Files (6)
File Name
Version
Size
Uploader
Date
1.3.1
5kB
ShadowMau
03/27/21 06:27 PM
1.3.0
5kB
ShadowMau
03/12/21 10:38 PM
1.2.0
5kB
ShadowMau
02/14/21 09:26 PM
1.1.1
4kB
ShadowMau
02/11/21 06:05 PM
1.1.0
5kB
ShadowMau
02/11/21 10:00 AM
1.0.0
4kB
ShadowMau
02/10/21 08:05 PM


Post A Reply Comment Options
Unread 02/13/21, 05:25 PM  
ShadowMau
AddOn Author - Click to view AddOns

Forum posts: 23
File comments: 46
Uploads: 12
Re: Addon suggestion

Originally Posted by Magnum1997
Hello, I love this addon idea. I have quite a few mount/pet links I would like to make and it forces UI reload when doing a link.
If possible I would love to see ability to setup links, then reload to implement them. Having to reload after each link is a bit time consuming.
Thanks for keeping this alive - I love to showcase my mounts and pets but manually changing them takes time - time I could be just playing ^_^

Thanks for updating this addon.
Thank You. I wrote this because when I recently released my Favorite Mount and Favorite Pet addons, someone suggested I make a linked one. So I wrote this. I am still learning so it is nothing fancy, but it is functional.

I ran into an issue where because of how I create the link, the settings screen would not properly refresh without a full reload. But I just thought of an idea of how I might be able to do it without having to do a full reload ui. Let me do some testing.

Update: Thanks to help from other developers, I now have a way to make the settings page no longer require a reload.
Last edited by ShadowMau : 02/20/21 at 10:15 AM.
Report comment to moderator  
Reply With Quote
Unread 02/13/21, 03:56 PM  
Magnum1997
 
Magnum1997's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 7
Uploads: 1
Question Addon suggestion

Hello, I love this addon idea. I have quite a few mount/pet links I would like to make and it forces UI reload when doing a link.
If possible I would love to see ability to setup links, then reload to implement them. Having to reload after each link is a bit time consuming.
Thanks for keeping this alive - I love to showcase my mounts and pets but manually changing them takes time - time I could be just playing ^_^

Thanks for updating this addon.
Report comment to moderator  
Reply With Quote
Unread 02/11/21, 01:17 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4964
File comments: 6032
Uploads: 78
Circonian did not update it, it was me. He is not playing eso anymore
There is no "last changes" or whatever website no, but we are in general exchange of ESO related dev news in the esoui gitter rooms:
https://gitter.im/esoui/esoui

If you know where it is wrong just change it. Take the circonian's example as a template, should be okay.

Originally Posted by ShadowMau

I did just a straight search for SavedVariables from the main page, and there appears to be no specific page set up for it. I did find the Storing_data_and_accessing_files page. In the two links provided, Circonians does show the new way (updated on Jan 6, 2021 so it was changed after I had read it), and the notebook tutorial shows a very simplified old way of doing it. I also found some references to libstub still scattered about. I know that libstub is dead. I hate to go in and change someone's else's example code and work. it just does not feel right, plus I may introduce new errors since I am using that very same example code to learn how to do stuff.

Is there a group or webpage where people who discover this stuff post their newest ideas and have the latest update shown. I used the Recent Changes link on the ESOUI wiki, but I see that even though Circonians example was changed, it was not listed under recent changes. Like I said, I had read Circonians example several months ago and was using that as my standard, but I see he updated it on Jan. 6th so I had no idea that there is an improved way to do it accommodating for multiple servers.
Last edited by Baertram : 02/11/21 at 01:17 PM.
Report comment to moderator  
Reply With Quote
Unread 02/11/21, 09:54 AM  
ShadowMau
AddOn Author - Click to view AddOns

Forum posts: 23
File comments: 46
Uploads: 12
[quote=Baertram]Be carefull if you change the SV in youra ddon now users will loose their settings if YOU do not migrate them from non server to server dependent ones!
Also if you change the version in the SavedVariables parameter this will set the old SV data = nil = gone!
[\quote]

Thank you for the warning. I will change only this one, and include it in future addons.


Nope, you can either use the namespace or profile params to create "subtables" with that name in the SV files.
If namespace is left nil it will automatically be switched to "Default".
The last param displayName of the ZO_SavedVars:NewAcountWide function provides a way to save all @acountNames the same. If left empty it will use GetDisplayName() to use your @accountName, else it will use the string you specify there.
e.g. "AllAccountsTheSame" will save the data for no matetr what of your @accountNames the same -> Replacing the tablename "@AccountName" in the SV file with "AllAccountsTheSame".


Originally Posted by Baertram
Afaik this info is alreay in the wiki at the SavedVariables page, maybe not in the existing example addons and tutorials.
https://wiki.esoui.com/Storing_data_and_accessing_files
Which links to these examples:
https://wiki.esoui.com/Circonians_Sa...ables_Tutorial
https://wiki.esoui.com/SimpleNotebookTutorial/part4
I did just a straight search for SavedVariables from the main page, and there appears to be no specific page set up for it. I did find the Storing_data_and_accessing_files page. In the two links provided, Circonians does show the new way (updated on Jan 6, 2021 so it was changed after I had read it), and the notebook tutorial shows a very simplified old way of doing it. I also found some references to libstub still scattered about. I know that libstub is dead. I hate to go in and change someone's else's example code and work. it just does not feel right, plus I may introduce new errors since I am using that very same example code to learn how to do stuff.

Is there a group or webpage where people who discover this stuff post their newest ideas and have the latest update shown. I used the Recent Changes link on the ESOUI wiki, but I see that even though Circonians example was changed, it was not listed under recent changes. Like I said, I had read Circonians example several months ago and was using that as my standard, but I see he updated it on Jan. 6th so I had no idea that there is an improved way to do it accommodating for multiple servers.
Report comment to moderator  
Reply With Quote
Unread 02/11/21, 09:10 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4964
File comments: 6032
Uploads: 78
Be carefull if you change the SV in youra ddon now users will loose their settings if YOU do not migrate them from non server to server dependent ones!
Also if you change the version in the SavedVariables parameter this will set the old SV data = nil = gone!

Nope, you can either use the namespace or profile params to create "subtables" with that name in the SV files.
If namespace is left nil it will automatically be switched to "Default".
The last param displayName of the ZO_SavedVars:NewAcountWide function provides a way to save all @acountNames the same. If left empty it will use GetDisplayName() to use your @accountName, else it will use the string you specify there.
e.g. "AllAccountsTheSame" will save the data for no matetr what of your @accountNames the same -> Replacing the tablename "@AccountName" in the SV file with "AllAccountsTheSame".


Afaik this info is alreay in the wiki at the SavedVariables page, maybe not in the existing example addons and tutorials.
https://wiki.esoui.com/Storing_data_and_accessing_files
Which links to these examples:
https://wiki.esoui.com/Circonians_Saved_Variables_Tutorial
https://wiki.esoui.com/SimpleNotebookTutorial/part4

Feel free to update every other SV info you find at the Wiki yourself please! Everyone is able to change the wiki.


Originally Posted by ShadowMau
Originally Posted by Baertram
Please: If you create new addons always consider adding the server name GetWorldName() (will return "EU Megaserver" or "NA Megaserver" or "PTS") to the ZO_SavedVars so they get saved server dependend from the start! At least for the account wide data:
Many players play on different servers with the same account and would like to store the data differently, dependet on the server.
CharacterIds are also only unqiue at the same server so even the chardata would need this, well, most probably you wont hit the exactly same charId on both servers but you could.

Thank you!

The best to achieve this is to add the GetWorldName() to the param profile" of the ZO_SavedVars:New * functions.

NewCharacterIdSettings:
(savedVariableTable, version, namespace, defaults, profile)
NewAccountWide:
(savedVariableTable, version, namespace, defaults, profile, displayName)
This is a really cool idea. I will go back and make changes on my other addons as well. Looking at esoui/esoui/libraries/utility/zo_savedvars.lua it just says "*profile - An optional string to describe the profile, or Default" which did not make the usage very clear. I just followed the examples provided on ESOUI Wiki. Could you or someone else please update the ESOUI Wiki so that people like me who are learning will know that this is considered the best practice? In fact the Wiki specifically states, "profile - Allows you to select a specific profile instead of the current character's default profile. Probably not necessary for most simple add-ons without robust profile management." This sounds quite scary. Is there other stuff I need to add besides what you gave me in order to properly manage profiles?
Last edited by Baertram : 02/11/21 at 09:14 AM.
Report comment to moderator  
Reply With Quote
Unread 02/11/21, 08:01 AM  
ShadowMau
AddOn Author - Click to view AddOns

Forum posts: 23
File comments: 46
Uploads: 12
Originally Posted by Baertram
Please: If you create new addons always consider adding the server name GetWorldName() (will return "EU Megaserver" or "NA Megaserver" or "PTS") to the ZO_SavedVars so they get saved server dependend from the start! At least for the account wide data:
Many players play on different servers with the same account and would like to store the data differently, dependet on the server.
CharacterIds are also only unqiue at the same server so even the chardata would need this, well, most probably you wont hit the exactly same charId on both servers but you could.

Thank you!

The best to achieve this is to add the GgetWorldName() to the param 2profile" of the ZO_SavedVars:New * functions.

NewCharacterIdSettings:
(savedVariableTable, version, namespace, defaults, profile)
NewAccountWide:
(savedVariableTable, version, namespace, defaults, profile, displayName)
This is a really cool idea. I will go back and make changes on my other addons as well. Looking at esoui/esoui/libraries/utility/zo_savedvars.lua it just says "*profile - An optional string to describe the profile, or Default" which did not make the usage very clear. I just followed the examples provided on ESOUI Wiki. Could you or someone else please update the ESOUI Wiki so that people like me who are learning will know that this is considered the best practice? In fact the Wiki specifically states, "profile - Allows you to select a specific profile instead of the current character's default profile. Probably not necessary for most simple add-ons without robust profile management." This sounds quite scary. Is there other stuff I need to add besides what you gave me in order to properly manage profiles?
Report comment to moderator  
Reply With Quote
Unread 02/11/21, 05:59 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4964
File comments: 6032
Uploads: 78
Please: If you create new addons always consider adding the server name GetWorldName() (will return "EU Megaserver" or "NA Megaserver" or "PTS") to the ZO_SavedVars so they get saved server dependend from the start! At least for the account wide data:
Many players play on different servers with the same account and would like to store the data differently, dependet on the server.
CharacterIds are also only unqiue at the same server so even the chardata would need this, well, most probably you wont hit the exactly same charId on both servers but you could.

Thank you!

The best to achieve this is to add the GgetWorldName() to the param 2profile" of the ZO_SavedVars:New * functions.

NewCharacterIdSettings:
(savedVariableTable, version, namespace, defaults, profile)
NewAccountWide:
(savedVariableTable, version, namespace, defaults, profile, displayName)
Last edited by Baertram : 02/11/21 at 06:02 AM.
Report comment to moderator  
Reply With Quote
Unread 02/10/21, 09:05 PM  
ShadowMau
AddOn Author - Click to view AddOns

Forum posts: 23
File comments: 46
Uploads: 12
Known Issue

There is a known issue when you have no link made, and only one link saved. I am working on the issues and should have an updated file loaded soon.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: