Skip to content

Add tier_text to /v2/achievements.#191

Open
BryghtShadow wants to merge 1 commit into
arenanet:masterfrom
BryghtShadow:patch-1
Open

Add tier_text to /v2/achievements.#191
BryghtShadow wants to merge 1 commit into
arenanet:masterfrom
BryghtShadow:patch-1

Conversation

@BryghtShadow

Copy link
Copy Markdown
Contributor

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). 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)

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)
@lye

lye commented Jan 20, 2016

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants