Add tier_text to /v2/achievements.#191
Open
BryghtShadow wants to merge 1 commit into
Open
Conversation
This change adds `tier_text` to allow displaying of tier text. The tier text can be seen in the tooltips of achievement watchlist HUD (on the right side of the screen, "Tier: X/Z Foobar\nTotal: Y/Z Foobar") and the achievement categories view (by selecting a category, and then viewing the tooltip for an achievement). Some achievements do not have any text for tiers (e.g. [Birthday—Year 1](https://api.guildwars2.com/v2/achievements/1681)). This can be represented as a blank string, or by making this field optional. For one-argument strings (i.e. `"%str1% Dungeon Story[pl:\"Stories\"] Complete"`), singular form is followed by plural form (e.g. `Item[s]` or `Match[pl:"Matches"]`). This is a bonus to find grammatical errors in the game data — namely single argument strings where a tier's count is 1 but the text is plural, such as "1 Ranked Matches Won as a Mesmer" (typo is only as an example; game uses correct singular form for this achievement)
Contributor
|
The text emitting functions I'm currently using use an empty context when evaluating the string -- both because that particular implementation detail predates me and because I'm wholly unfamiliar with our string parameterization. The raw strings are something we could expose, but I haven't spent any time thinking about the implications of doing so so I don't want to commit to that. Off-hand, I think it would make the most sense to expose both the raw and evaluated strings if only to lower the barrier to entry for application developers. But exposing the tier text, in one form or another (or both) is totally reasonable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds
tier_textto allow displaying of tier text. The tier text can be seen in the tooltips of achievement watchlist HUD (on the right side of the screen, "Tier: X/Z Foobar\nTotal: Y/Z Foobar") and the achievement categories view (by selecting a category, and then viewing the tooltip for an achievement).Some achievements do not have any text for tiers (e.g. Birthday—Year 1). This can be represented as a blank string, or by making this field optional.
For one-argument strings (i.e.
"%str1% Dungeon Story[pl:\"Stories\"] Complete"), singular form is followed by plural form (e.g.Item[s]orMatch[pl:"Matches"]). This is a bonus to find grammatical errors in the game data — namely single argument strings where a tier's count is 1 but the text is plural, such as "1 Ranked Matches Won as a Mesmer" (typo is only as an example; game uses correct singular form for this achievement)