Download
(36 Kb)
Download
Updated: 04/19/20 02:23 AM
Pictures
File Info
Compatibility:
Harrowstorm (5.3.5)
Dragonhold (5.2.5)
Scalebreaker (5.1.5)
Elsweyr (5.0.5)
Updated:04/19/20 02:23 AM
Created:06/30/19 06:47 AM
Monthly downloads:243
Total downloads:6,680
Favorites:20
MD5:
PetZone  Popular! (More than 5000 hits)
Version: 3.3
by: Brotanks [More]
Well, decided against implementing LibAsync. Too much trouble for not enough reason. Continue as normal!

Version 3.0! Aside from the requisite code tweaking, I added in a couple new features: Custom Random Lists and an Exclusion list. Both are just like they sound!

Custom Random Lists: You can create a custom list of pets and assign it to a zone or subzone; the game will select randomly from only the pets on that list in that area.

Exclusion List: The exclusion list only affects the -RANDOM- choice; animals placed on this list will never be chosen. Those animals WILL still show up, however, if you assign them specifically to a zone/subzone or if you put them on your own custom random list. Curate your own damn options

I think I've beaten the worst of the "collectible not ready" spam, but if you run other addons that also activate collectibles then there's always a chance it'll pop up. Collectibles have a hidden global cooldown that I can't figure out how to monitor through the API, so it's mostly down to timing. If anyone knows of a better solution, I'm all ears!
And finally, I added an option to hide your pets when sneaking. I got tired of glowing demonic ponies following me around while I was breaking and entering.


This addon requires the libraries LibAddonMenu-2.0 and LibZone.

PetZone: Automatic Vanity Pet Switching By Area!
This is a fairly simple addon that lets you automatically switch vanity pets in different zones and subzones! If you've ever wanted your housecat following you around Rawl'kha, to be replaced by a swamp jelly when you head out into the wilderness, to be switched to a chicken when you enter a dungeon, then this mod is for you.

Features:
-Set a pet for a specific subzone within a zone, for -ALL- subzones within a zone, or for -ALL- zones
-Highest priority goes to your specific subzone choice, then to your entire zone choice, then your all zones choice. If none of those three have choices defined, then you continue with whatever pet you had out already
-Pet choices also include -NONE-, which puts away your pets in that area; -RANDOM-, which summons a random pet; and ~Custom Random Lists, which summons a random pet from a list you specify
-You can choose to automatically hide your pet when you enter combat, join a group, enter a dungeon or delve, or enter stealth


That's about it! All thanks for this mod go directly to Baertram, as I ruthlessly and inexpertly hacked apart their FCO Mounty mod to make it. Seriously! I didn't know any lua when I started this, and a good chunk of the code in here is only slightly modified from Baertram's. I'm mostly considering this addon complete except for filling out the rest of the zone data, but if you think it could use something else then leave a comment and I'll consider it.
3.3
  • The Character/Account settings now work on an individual basis! Any characters set to use Account settings will share those settings, and any characters set to Character will use their own. If you had your characters set to individual settings, you might need to switch them back to that. Nothing should be lost.
  • Relatedly, the mechanism for saving pet choices to zones and subzones was changed. Your SavedVariables file now has a drastically decreased footprint, which will help loading times. Your pet choices should all still be intact!

3.2
  • Zone updates for Harrowstorm, finally. Also for the Greymoor prologue.
  • Decided against using LibAsync. PetZone was causing far less lag than I'd thought, so it wasn't worth the extensive rewrite. Sorry for the false alarm!

3.1
  • Quick API bump for Harrowstorm. Zone updates to come a little later.
  • Be warned, NEXT UPDATE will add LibAsync as a dependency! This should stop contributing lag at logon and reloadui, at the cost of taking PetZone some seconds to initially fully load.

3.0
  • Added custom random lists! See description for details.
  • Added an exclusion list! See description for details.
  • Added an option to hide pets while stealthed.
  • Pared down the "collectible not ready" spam.
  • Various code tweaks and fixes. As always, thanks Baertram!

2.6
  • The "Hide Pet in Combat" option should no longer cause collectible use spam in areas that don't allow vanity pets. Thanks ScottW!
  • Slightly longer delay to collectible use when changing zones. Should also reduce usage spam.
  • Couple o' subzone name changes.

2.5
  • API bump for Dragonhold, and added Dragonhold's new zones and subzones. They should be largely accurate, although I may end up needing to correct one or two.
  • Minor under-the-hood changes for added flexibility. Shouldn't affect anything.

2.4
  • Minor zone changes. No more collectible use spam in Cyrodiil, hopefully

2.3
  • Some code cleanup. Thanks Baertram!

2.2
  • API bump for Scalebreaker! Added Moongrave Fane and Lair of Maarselok to the Group Dungeons.
  • Related to above, added some additional checks to stop it throwing errors in unknown zones.
  • Removed "Help the developer option", as it's no longer needed. Thanks folks!

2.1:
  • Made the "hide in combat" option more robust. Spamming skills from the start of combat tends to interrupt collectible usage, who knew?
  • Moved Fang Lair with the rest of the dungeons.

2.0:
  • Changed the way subzone ids are parsed, for more granular control of area groupings. Will probably break previous pet assignments
  • Various under-the-hood changes for more flexibility in working with subzone ids
  • Changed some subzone groupings to make them more accessible
  • Put in ALL THE SUBZONES. Or at least, the vast majority. One or two are still missing and I might have mis-assigned a few; if you run into anything odd please leave a comment on the add-on page

1.1:
  • Added options to hide pets while in a group or in dungeons and delves

1.0:
  • Initial release
Optional Files (0)


Archived Files (12)
File Name
Version
Size
Uploader
Date
3.2
36kB
Brotanks
03/31/20 07:44 PM
3.1
35kB
Brotanks
02/24/20 07:12 AM
3.0
35kB
Brotanks
11/25/19 12:24 PM
2.6
32kB
Brotanks
10/23/19 07:14 AM
2.5
33kB
Brotanks
10/21/19 05:44 PM
2.4
31kB
Brotanks
09/15/19 11:20 AM
2.3
31kB
Brotanks
08/25/19 08:00 AM
2.2
31kB
Brotanks
08/18/19 12:01 PM
2.1
31kB
Brotanks
07/21/19 09:50 PM
2.0
31kB
Brotanks
07/17/19 06:37 PM
1.1
20kB
Brotanks
07/01/19 09:39 PM
1.0
20kB
06/30/19 06:47 AM


Post A Reply Comment Options
Unread 06/30/19, 10:53 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4962
File comments: 6032
Uploads: 78
Hi, thanks for making this addon.

One thing for the future:
Please ask before just copying other devs work (addons, libraries,... )
It's no big deal for me with this addon (FCOMounty) but it's not the way it should normally go

@zoneData for delves and dungeons:
Imo pets shouldn't be enabled in dungeons. Delves, well, if you must. But inside dungeons they really annoy other users and do not help (at least non-combat pets) at all.
Maybe inside a role-play-only group
Report comment to moderator  
Reply With Quote
Unread 06/30/19, 12:35 PM  
Brotanks
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Originally Posted by Baertram
Hi, thanks for making this addon.

One thing for the future:
Please ask before just copying other devs work (addons, libraries,... )
It's no big deal for me with this addon (FCOMounty) but it's not the way it should normally go

@zoneData for delves and dungeons:
Imo pets shouldn't be enabled in dungeons. Delves, well, if you must. But inside dungeons they really annoy other users and do not help (at least non-combat pets) at all.
Maybe inside a role-play-only group
Sorry about that =X I'm not a person who codes at all, but asking first should have been more obvious in retrospect. If you want me to take it down, I totally understand.

As for dungeons and delves, I know what you mean But I figure this mod will appeal more to roleplaying types anyway, and I did include a "none" option to put away all pets in a given area. Maybe an option to automatically stow away pets when you enter a dungeon? Or when you join a group? Time to go skim the wiki again..
Report comment to moderator  
Reply With Quote
Unread 07/02/19, 06:51 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4962
File comments: 6032
Uploads: 78
No, it's fine. Just go on
I remember there is an addon which does this, near crafting tables: Dolgubons Lazy Writ Creator
From my addons I know it's hard to check if you are inside a delve. A dungeon is no problem as there are API functions for it.
But a delve can only be determinded via some "guessing functions" like "are we in a group" or "are we on a map where the name of a POI contains delve".
You can check my addon WhisList, and check the file functions.lua. I think near the end there is such a check fucntion for dungeon, delve, or public dungeon.

Originally Posted by Brotanks
Originally Posted by Baertram
Hi, thanks for making this addon.

One thing for the future:
Please ask before just copying other devs work (addons, libraries,... )
It's no big deal for me with this addon (FCOMounty) but it's not the way it should normally go

@zoneData for delves and dungeons:
Imo pets shouldn't be enabled in dungeons. Delves, well, if you must. But inside dungeons they really annoy other users and do not help (at least non-combat pets) at all.
Maybe inside a role-play-only group
Sorry about that =X I'm not a person who codes at all, but asking first should have been more obvious in retrospect. If you want me to take it down, I totally understand.

As for dungeons and delves, I know what you mean But I figure this mod will appeal more to roleplaying types anyway, and I did include a "none" option to put away all pets in a given area. Maybe an option to automatically stow away pets when you enter a dungeon? Or when you join a group? Time to go skim the wiki again..
Report comment to moderator  
Reply With Quote
Unread 07/07/19, 09:27 AM  
Brotanks
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Originally Posted by Baertram
No, it's fine. Just go on
I remember there is an addon which does this, near crafting tables: Dolgubons Lazy Writ Creator
From my addons I know it's hard to check if you are inside a delve. A dungeon is no problem as there are API functions for it.
But a delve can only be determinded via some "guessing functions" like "are we in a group" or "are we on a map where the name of a POI contains delve".
You can check my addon WhisList, and check the file functions.lua. I think near the end there is such a check fucntion for dungeon, delve, or public dungeon.
Thanks for the tips! I added an option to disable pets while grouped, and a quick one to disable pets in dungeons via the IsUnitInDungeon command. The wiki says that one works in delves as well; if it ends up covering too much or too little I'll try something else.

Right now, though, my main problem is that quite a few delves have too many different subzone Ids (_base, _room01, _room02, etc) and I don't think anyone is going to want THAT much granular control of their vanity pets I put together a table that associates one subzone name with multiple ids, and I'm trying to use it to assign one pet to multiple ids at once. It's a learning process 0__o
Report comment to moderator  
Reply With Quote
Unread 07/18/19, 05:17 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4962
File comments: 6032
Uploads: 78
Right now, though, my main problem is that quite a few delves have too many different subzone Ids (_base, _room01, _room02, etc) and I don't think anyone is going to want THAT much granular control of their vanity pets I put together a table that associates one subzone name with multiple ids, and I'm trying to use it to assign one pet to multiple ids at once. It's a learning process 0__o
Haha yea, I'm glad the mounts cannot be used in "most" dungeons, and at least no delves. So I did not have to add all these subzones
I'd just go with the "main zoneId" as I don't think one would like to have pet1 at the entrance and pet2 at the 2nd lower floor etc.
Report comment to moderator  
Reply With Quote
Unread 07/19/19, 01:14 PM  
Brotanks
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Originally Posted by Baertram
Haha yea, I'm glad the mounts cannot be used in "most" dungeons, and at least no delves. So I did not have to add all these subzones
I'd just go with the "main zoneId" as I don't think one would like to have pet1 at the entrance and pet2 at the 2nd lower floor etc.
I basically ended up spending several boring days condensing down the game's map texture list and connecting it all up to LibZone. I... had to guess on a few things

I did work out how to connect multiple ids to one name though! So there aren't 6 entries for different parts of one dungeon. Now it's a matter of slowly finding which ids are mislabeled and rearranging the categories properly. It's gonna be a slog. If you ever need subzone ids for anything, my zonedata file is getting comprehensive.
Report comment to moderator  
Reply With Quote
Unread 08/23/19, 11:20 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4962
File comments: 6032
Uploads: 78
Hey there,

a few hints to your addon code:
You should define functions as local if they are only used in 1 file of your addon.
Check e.g. your file PetZoneSettings.lua and the 2 functions
function BuildPetDopdown
function tableContains

They both seem to be used only inside this file so just put local in front of the function declaration or they will be globally usable by other addons as well. If your function name maybe is the same like another addon's function or variable name you'd overwrite theirs e.g. so keep all local you do not need to be exposed to others, or add them to your addon's table like
function PZ.BuildPetDopdown
function PZ.tableContains
which would make them rare to be duplicate somewhere in other addons
Last edited by Baertram : 08/23/19 at 11:24 AM.
Report comment to moderator  
Reply With Quote
Unread 10/17/19, 05:49 PM  
ScottW

Forum posts: 0
File comments: 69
Uploads: 0
Error entering zone

Really like this addon - THANKS!

I am seeing a minor issue. When entering a zone (including initial logon, or exiting a dungeon/delve/thieves guild where pet was hidden by the addon), I sometimes (frequently) see an error "This collectible is not ready yet."

Perhaps there needs to be a few seconds delay after entering zone, before attempting to activate pet?

Thanks again, great idea for an addon.
Report comment to moderator  
Reply With Quote
Unread 10/21/19, 12:47 PM  
ScottW

Forum posts: 0
File comments: 69
Uploads: 0
Error when in Housing

Having a second issue...

1. Setup Petzone for All/All same pet, and "hide in combat". All good overland.

2. Ported to primary housing (pet was dismissed by eso). All good so far.

3. Engaged target dummy in combat. Immediately received error about collectible (didn't see exact text). When combat ended, get a repeating error -- every 5 seconds -- "This collectible cannot be used in this zone."

Is there a way to stop PetZone from trying to hide/activate pets when in housing? Setting "no pet" for the entire zone in which the house resides works, but is more extreme than desired.
Report comment to moderator  
Reply With Quote
Unread 10/21/19, 05:37 PM  
Brotanks
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Re: Error when in Housing

Originally Posted by ScottW
Having a second issue...

1. Setup Petzone for All/All same pet, and "hide in combat". All good overland.

2. Ported to primary housing (pet was dismissed by eso). All good so far.

3. Engaged target dummy in combat. Immediately received error about collectible (didn't see exact text). When combat ended, get a repeating error -- every 5 seconds -- "This collectible cannot be used in this zone."

Is there a way to stop PetZone from trying to hide/activate pets when in housing? Setting "no pet" for the entire zone in which the house resides works, but is more extreme than desired.
Oh hey! Good catch; I'm a scrub player who doesn't use combat dummies often enough to notice that Should be able to put in a check to ignore combat in off-limits areas. And a delay for zone loading is simple enough. I'm just updating for the patch at the moment, but I'll try to get fixes for those up in a day or three, along with a couple other messy areas. Glad you're enjoying the addon!
Report comment to moderator  
Reply With Quote
Unread 10/23/19, 03:01 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4962
File comments: 6032
Uploads: 78
Hey there,

please remove this line from the addon code (copied from FCOMounty):
PZ_settingsMenu.lua, line 292
Code:
CALLBACK_MANAGER:UnregisterCallback("LAM-PanelControlsCreated")
It shouldn't raise any errors but it's useless and not-needed and MAY cause problems in the future.
It only makes sense if called with the function name as 2nd parameter to unregister as well so this won't do anything.

Thanks.
Report comment to moderator  
Reply With Quote
Unread 10/31/19, 11:13 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4962
File comments: 6032
Uploads: 78
LibZone with next update only usable without LibStub!

Attention:
LibZone will be removing LibStub compatibility.
Please check and change your addon's to NOT use LibStub for LibZone anymore but load it via the global variable
Code:
LibZone
instead!
Report comment to moderator  
Reply With Quote
Unread 11/27/19, 04:35 AM  
hagermanj

Forum posts: 2
File comments: 367
Uploads: 0
Mounts

First I want to say I love this addon. GREAT work.

Now would it be possible to create another addon for mounts. So that you can choose which mounts or mounts you use for each zones.
Report comment to moderator  
Reply With Quote
Unread 11/28/19, 03:04 AM  
Brotanks
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Re: Mounts

Originally Posted by hagermanj
First I want to say I love this addon. GREAT work.

Now would it be possible to create another addon for mounts. So that you can choose which mounts or mounts you use for each zones.
My friend, today is your lucky day. This addon here owes its entire existence to FCO Mounty, by the immortal Baertram. I think you'll enjoy it!
Report comment to moderator  
Reply With Quote
Unread 05/06/20, 08:48 PM  
Clyde BlueSnake
 
Clyde BlueSnake's Avatar

Forum posts: 0
File comments: 5
Uploads: 0
Thumbs up Great addon, but a minor error?

First off great addon! Though I spotted a minor bug/error while in Grahtwood, Reliquary of Stars. While doing the zone quest there when I went into the chamber area there called the Reliquary Vault my pet that I have set for Grahtwood (Sep Adder) got changed to the one I set for Auridon (Psijic Mascot Wolf Pup) for both of there subzone I set to -ALL-. After looking through the addon settings of PetZone I seen under the subzone list for Auridon I saw "Reliquary Ruins", I think the mistake is there for there's no "Reliquary Ruins" in Auridon? Anyway, it's minor & I think the only time a player goes in the Reliquary Vault is only during the zone story quest there so nothing big, just letting ya know.
Last edited by Clyde BlueSnake : 05/06/20 at 09:12 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: