ZOS Achievement Progress Calculation for Multicriteria Achievements

Howdie all,

not sure if the right place, but just wanted to deposit this somewhere so google can pick it up. And if ever somebody else needs to figure out how ZOS calculates these insane looking values for achievementwide progress on multi-criteria achievements. Said person won't have to slam hisher head against the wall for a few hours.

Am talking about Achievements like Nature/Undead Slayer.

Examples:
UndeadSlayer 1000/1000 1000/1000 768/1000 500/500 -> progress value = 537677243368
HumanoidSlayer 1000/1000 500/500 87/100 -> progress value = 46126056

From GetAchievementProgressFromLinkData(self.achievementId, self.progress) which returns an list with progress per criteria it is clear that it is even reversible. But I didn't find the inverse function of given the progress on all the criteriums would return the achievement wide progress value.

The obvious way to do it would be to consider it some weird ass Numberscheme where each part can be multidigit and base changes from part to part based on numberrequired. Each part being the different criteria. Either ascending or descending. Just looking at the numbre makes it clear. Aint the case here. Base of 500 1000 and 100 would have resulted in plenty more 0 in there.

Well the idea ZOS would do it that way was not far off. But instead of using the numrequired values of each criterium as the base of that digit. They actually round it up to the next power of 2 number.

numrequired -> actual base used for calculations:
25->32
50->64
100 -> 128
200 -> 256
500 -> 512
1000 -> 1024

Tall papa knows why....my gut thinks might be dark arts of bitshifting related ...

To apply this to the examples:
HumanoidSlayer 1000/1000 500/500 87/100 -> progress value = 46126056

The bases are 1024 512 (128)
And the calculation is 1000 + 500*1024 + 87*512*1024 which indeed gives 46126056

UndeadSlayer 1000/1000 1000/1000 768/1000 500/500 -> progress value = 537677243368

The bases are 1024 1024 1024 (512)
1000 + 1000*1024 + 768*1024*1024 + 500*1024*1024*1024 = 537677243368

Either at the left below the "Data" section add an "Achievement" section and add this as subpoint "Calculation of progress", or at the right side below "More" maybe.