WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   A list of friendshipRepIDs? (https://www.wowinterface.com/forums/showthread.php?t=59050)

myrroddin 02-18-22 07:17 PM

A list of friendshipRepIDs?
 
I went looking through Wowpedia and Wowhead and couldn't find the friendshipRepIDs for factions that are friends. Searching Wowpedia for 'factionid' returned the expected factionIDs, but those are not the same numbers.

The best I could do was this search on WoW.tools with the ID column, but I can't confirm the results. Plus, that is awkward to crawl through if I only want a list.

I can write a quick and dirty addon to parse my reputation panel, but I don't have every friend discovered and the results would be incomplete.

What I'd like is 'name' = friendshipRepID or even factionID = friendshipRepID. Did I miss something in the online tools?

Tim 02-18-22 07:50 PM

Not sure if either of these are of any help...

https://wowpedia.fandom.com/wiki/API...shipReputation
https://wowpedia.fandom.com/wiki/API...eputationRanks

myrroddin 02-18-22 10:28 PM

If I build a quick and dirty addon, the first API will be useful. Sadly, the second does not work. https://wowpedia.fandom.com/wiki/API...eputationRanks returns 0, 0, probably because Blizzard added friends that have different maximum ranks.

Garrison bodyguards have 3 ranks, others have 5, some have 6, a few have 7, and the Naz'jatar trio by the campfire have 30, plus a few oddballs in between.

I don't actually need the friendshipRepIDs for my main project; knowing those would be convenient. This was more of a curiosity question.

arkayenro 02-22-22 04:45 AM

Quote:

Originally Posted by myrroddin (Post 340336)
Sadly, the second does not work.

it should work but it doesnt take the factionid it takes the friendid from the first apis return, at least thats i have mine coded and it seems to work ok.

you should be able to loop through 1-5000 for the GetFriendshipReputation function and check if the first return is set, if it is a "friend" then you can call GetFriendshipReputationRanks with that value to get the current and max ranks.

just double checked and my code works fine, just call it with the friendid, not the factionid and youll be fine. that api page needs to be fixed.

myrroddin 02-22-22 11:19 AM

Quote:

Originally Posted by arkayenro (Post 340339)
it should work but it doesnt take the factionid it takes the friendid from the first apis return, at least thats i have mine coded and it seems to work ok.

you should be able to loop through 1-5000 for the GetFriendshipReputation function and check if the first return is set, if it is a "friend" then you can call GetFriendshipReputationRanks with that value to get the current and max ranks.

just double checked and my code works fine, just call it with the friendid, not the factionid and youll be fine. that api page needs to be fixed.

I will test it later today. If you are correct, that's brilliant!

Ketho 02-22-22 08:37 PM

Quote:

Originally Posted by arkayenro (Post 340339)
it should work but it doesnt take the factionid it takes the friendid from the first apis return, at least thats i have mine coded and it seems to work ok.
[...]
just double checked and my code works fine, just call it with the friendid, not the factionid and youll be fine. that api page needs to be fixed.


To me it looks like both refer to the same ID. Also I could swear it was bugged, and Blizzard fixed it some point in time. Anyway it's a wiki, the point is that anyone can fix wrong documentation...

Ketho 02-22-22 08:37 PM

Quote:

Originally Posted by myrroddin (Post 340341)
I will test it later today. If you are correct, that's brilliant!

Yeah, just iterate up to a high ID and if its a friendship then GetFriendshipReputation() will return valid information. Otherwise look it up on:
Quote:

Originally Posted by myrroddin (Post 340334)
The best I could do was this search on WoW.tools with the ID column, but I can't confirm the results. Plus, that is awkward to crawl through if I only want a list.
[...]
What I'd like is 'name' = friendshipRepID or even factionID = friendshipRepID. Did I miss something in the online tools?

It shouldn't be "awkward to crawl through" if you have a CSV reader in your preferred language or even in excel / google sheets

myrroddin 02-22-22 09:49 PM

Quote:

Originally Posted by Ketho (Post 340350)
It shouldn't be "awkward to crawl through" if you have a CSV reader in your preferred language or even in excel / google sheets

I don't have such a thing, and wouldn't know how to create one. Anyway, my question is answered, problems are solved. I just need to finish coding the update to my addon. Better late than never, I suppose :D:cool:

Kanegasi 02-22-22 11:00 PM

Quote:

Originally Posted by arkayenro (Post 340339)
just call it with the friendid, not the factionid and youll be fine. that api page needs to be fixed.

The only difference between the two IDs is whether or not the friendship functions return data. A friend is a type of faction. Factions and friends aren't like 1-10 for one then 1-10 for another, it's more like factions 1-20 but 6, 8, 14, 15, and 19 are friends. The friendship functions will only return data for a faction labeled as a friend, but all the faction functions return data for them all.

myrroddin 02-23-22 10:06 AM

o_O that explains all the gaps in the factionIDs list. The friends are the "hidden" or "missing" numbers. Suddenly it all makes sense.

Incidentally, with all of your help, I got my ElvUI plugin updated last night without hard-coding maximum ranks. Thank you everybody! :)

Ketho 02-25-22 07:57 AM

Quote:

Originally Posted by myrroddin (Post 340357)
o_O that explains all the gaps in the factionIDs list. The friends are the "hidden" or "missing" numbers. Suddenly it all makes sense.


Well I'll be fixing https://wowpedia.fandom.com/wiki/API...eputationRanks again because a friendshipID technically only exists in the DB2, I hope you understand now that they are a subset / the same ID


All times are GMT -6. The time now is 03:07 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI