LibTourist-3.0
LibTourist is a library that provides information about zones, instances, transports and more.
For zones, instances, complexes (like Caverns of Time), arenas and battlegrounds, LibTourist can provide level range, faction, size, location and connections with other zones, as well as instance group sizes, instance entrance portal coordinates and battle pet level ranges, if applicable. LibTourist supports localization.
Color-coding for level ranges and zone names is available.
Relationships between continents, zones and instances can be provided, i.e. which instances are located in a specific complex, in which continent resides a zone and so on. In addition, a large number of iterations is available allowing addons to browse through subsets of the zone data.
The library contains information about connections between zones, including transports like zeppelins, boats and portals. These connections can be used to calculate a route between two zones. LibTourist can also be used for distance calculations between coordinates.
Furthermore, LibTourist can provide data about flight nodes and gathering profession skills (Mining, Herbalism, Skinning).
An extensive API allows the addon developer to query LibTourist in many ways.
See the API Reference page for detailed information.
NOTE: LibTourist should not be installed separately as it does not add anything to the game on its own. LibTourist is not an addon but a library, to be referenced and used by addons (like ZoneInfo 2).
WoW Cataclysm Classic:
Please refer to the LibTourist Classic (Cataclysm) page for the Cataclysm Classic version of LibTourist.
WoW Classic Era:
Please refer to the LibTourist Classic Era page for the Classic Era version of LibTourist.
In reply to marblex:
In reply to Odica:
Thank you Odica :)
@Bisaz
An alpha version has been released which will hopefully satisfy your needs ;-)
Nice to read, thank you Odica :)
@Bisaz
I am currently in the middle of moving to the other side of my country, but I still maintain the lib and will release an update as soon as I can. Please be a bit patient, though, it will take some time... ;-)
Can't wait to see this lib for Legion :)
@burny_dd
You are right, I will add it to the next release. Thanks for the reminder :-)
It seems to me that Siege of Orgrimmar instance is missing in the lib. Or am I mistaken?
@twobits
Hm... I have no clue why this was originally built this way. If you meet the required minimum level, you can enter a BG, all the way up to the game level cap, as far as I know. No idea what the fmod construction is for, so I removed it and replaced it with a straight-forward low/high-check :-) Also, I have upped the high value for all BG's to 90 to make that check work for players above 85.
See r156...
Would you be so kind to check if this results in the expected behaviour? Thanks! ;-)
Odica
@Odica
Ah, well that may explain why the IterateRecommendedInstances no longer works as they used to for BGs.
It used to be if you had a character that was the right level for say, WSG and AB you would get these returned and no other BGs. At max level you would get all of them. I no longer am seeing recommended BGs on low level characters. I was proposing that instead of fixing RecommendedInstances a new RecommendedBGs that behaves like it used to , but just for BGs be added.
I have and was looking at Wow-5.0-beta2 of LibTourist. I see code like
and for other BGS that seem to set the high to 85., so the high is being set to only 85, then just ignored in the code it seems?
Also,
seem to be an attempt to only recommend BGs when you are x6-x9, but that is not accurate for the current brackets as it misses recommending x4
@alsuko
Hi Alsuko,
I have compared the Pandaria zone levels to what the game itself suggests. Turns out that 88-89 for Towlong Steppes is correct.
However, 87-88 for Dread Wastes is incorrect, this should be 89-90. It will be corrected in the next release of LibTourist.
Thanks!
Odica
@twobits
Hi Twobits,
I don't quite understand how battlegrounds can be recommended, as they have level brackets which make them accessible for all player levels that meet the minimum level requirement for the BG. Furthermore, the max level is not set to 85 but to MAX_PLAYER_LEVEL, which is supplied by WoW (currently 90).
Odica
I use elvui location +, it use your library. I see a mistake for the townlong steppes for the level of this zone. It must be to appear 89-90.
Thank you (i'm frensh)
Would it make any sense to add an IterateRecommendedBattlegrounds()
I guess it does not matter that the max_level for the Battlegrounds is still set to 85?
Maybe these should be made auto adjusting?
something like
local current_max_level = MAX_PLAYER_LEVEL_TABLE[GetExpansionLevel()]
then use current_max_level for the max_level = in the Battlegrounds.
@nickyjean01
I'm sorry, I missed your comment somehow, but in the meantime a ticket has been created for this idea. I'll look into it, I think it would be a valuable addition.
I am the author of PetShop and was working on a complete rewrite of the addon. I needed the ability to know what level Battle Pets were in each zone. Before I started writing new code I decided to look into LibTourist. While there is not currently support for it I added it in the version on my computer. I thought I would share my modifications with you in case you wanted to make it a part of your addon. It was your addon anyway... :)
I added local declerations around line 110...
local petbattle_min = {}
local petbattle_max = {}
I added a new function call to be used by 3rd party addons around line 161
-- Level of Battle Pets
function Tourist:GetBattlePetLevel(zone)
return petbattle_min[zone], petbattle_max[zone]
end
I added 2 lines to each "zone" like this...
zones[BZ["Elwynn Forest"]] = {
low = 1,
high = 10,
continent = Eastern_Kingdoms,
paths = {
[BZ["Westfall"]] = true,
[BZ["Redridge Mountains"]] = true,
[BZ["Stormwind City"]] = true,
[BZ["Duskwood"]] = true,
[BZ["Burning Steppes"]] = true,
[ELWYNNFOREST_DARKMOON_PORTAL] = true,
},
faction = "Alliance",
fishing_min = 25,
petbattle_min = 1,
-- petbattle_max = 0,
}
If petbattle_min is commented out then currently "unknown", 0 is "No Battle Pets". petbattle_max is optional.
In the loop at the very bottom of the addon I added...
petbattle_min[k] = v.petbattle_min
petbattle_max[k] = v.petbattle_max
Feel free to use this or drop me a line and I will send you my version in a zip file.
Thanks for a great addon!
Rakreo of Duskwood
Hi smccandl,
I am planning to add the pet battle levels to LibTourist soon. There's already a ticket on that at the developer site of LibTourist. What you describe is about what has to be done in LibTourist to add this functionality, but I currently I do not have a list of battle pet min/max levels per zone.
So... If you are willing to share your changes it would be appreciated :-)
Please go to http://www.wowace.com/addons/libtourist-3-0/, we can start a private conversation there (by sending me a PM). Also, you can add your post to Ticket #37, to keep all related info together in one location:
http://www.wowace.com/addons/libtourist-3-0/tickets/37-battle-pet-levels-in-zones/
Thanks & regards,
Odica
See LibTourist r155, available at the developer site.
- added Battle Pet Levels (special thanks to Grdn!)
- API: added function: low,high = GetBattlePetLevel(zone)
- API: added function: r,g,b = GetBattlePetLevelColor(zone, petLevel)
- API: added function: string = GetBattlePetLevelString(zone)
Date: 2012-10-06 16:07:21
ID: 4
Error occured in: Global
Count: 1
Message: ...psterEnhanced\Libs\LibTourist-3.0\LibTourist-3.0.lua line 1708:
bad argument #1 to 'pairs' (table expected, got nil)
Debug:
[C]: ?
...psterEnhanced\Libs\LibTourist-3.0\LibTourist-3.0.lua:1708: CreateLocalizedZoneNameLookups()
...psterEnhanced\Libs\LibTourist-3.0\LibTourist-3.0.lua:1733: in main chunk
Locals:
(*temporary) = nil
(*temporary) = "table expected, got nil"
= <function> defined =[C]:-1