Thread Tools Display Modes
03/22/19, 10:06 AM   #1
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
[open] Dragon Bones achievements

Hello,
I can't seem to get Dragon Bones General achievements through the API.

In-game you can see, that there are two categories:


But when requesting them through API, I get only one:
Request: GetAchievementCategoryInfo(16)
Response: [Dragon Bones, 1, 8, 355, 675, false]
And requesting the subcategoies, also only the first one is returned:
Request: GetAchievementSubCategoryInfo(16, 1)
Response: [Veteran, 30, 320, 730, false]
And nothing for 2nd category

Is this a bug or am I requesting something wrong?
  Reply With Quote
03/22/19, 10:15 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Aaxc View Post
Hello,
I can't seem to get Dragon Bones General achievements through the API.

In-game you can see, that there are two categories:


But when requesting them through API, I get only one:


And requesting the subcategoies, also only the first one is returned:


And nothing for 2nd category

Is this a bug or am I requesting something wrong?
The "General" sub-category is "nil" as the second parameter.
  Reply With Quote
03/22/19, 10:27 AM   #3
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
It's just like grade school math: nil, 1, 2, 3! Right?
  Reply With Quote
03/23/19, 08:10 AM   #4
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
Originally Posted by votan View Post
The "General" sub-category is "nil" as the second parameter.
No, it does not seem like that, here:

Request: GetAchievementCategoryInfo(16)
Response: [Dragon Bones, 1, 8, 355, 875, false]
Request: GetAchievementSubCategoryInfo(16, nil)
Response: [Veteran, 30, 320, 730, false]
Request: GetAchievementCategoryInfo(16, 1)
Response: [Veteran, 30, 320, 730, false]
In comparison Wolfhunter also has the same two subcategories (General and Veteran):

Request: GetAchievementCategoryInfo(15)
Response: [Wolfhunter, 2, 0, 220, 840, false]
And you can get 1 and 2 there:

Request: GetAchievementSubCategoryInfo(15, nil)
Response: [General, 9, 30, 150, false]
Request: GetAchievementSubCategoryInfo(15, 1)
Response: [General, 9, 30, 150, false]
Request: GetAchievementSubCategoryInfo(15, 2)
Response: [Veteran, 29, 190, 690, false]
  Reply With Quote
03/25/19, 06:23 AM   #5
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
Still trying to understand this issue. Any idea where else I could ask about it?
  Reply With Quote
03/25/19, 07:46 AM   #6
Kyoma
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 125
Not sure why there is this inconsistancy with the newer achievements, in the past it all worked like votan said. You'd access the "General" achievements by passing "nil" as the second parameter for GetAchievementId and the rest of the achievements were in subcategory 1 to x. All of this comes directly from the client so I guess ZOS decided to mix things up for a change.

None of this would really matter because, per your posted snippet, the numAchievements return value (the third) from GetAchievementCategoryInfo is 0. So you don't end up with duplicate "General" entries as long as you check that I guess.

Edit: Oh wait, so I guess the misunderstanding is with using nil for GetAchievementSubCategoryInfo to get the "General" achievements. Which isn't the case, you pass "nil" as subcategory to GetAchievementId. See the vanilla code for a better understanding on how it all works: https://github.com/esoui/esoui/blob/...ents.lua#L1802

Last edited by Kyoma : 03/25/19 at 08:21 AM.
  Reply With Quote

ESOUI » Developer Discussions » Bug Reports » [open] Dragon Bones achievements

Thread Tools
Display Modes

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