@indiegems/gem-web-sdk 7.9.1 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,9 +49,20 @@ one progression, not three progressions.
49
49
 
50
50
  What the upload enforces, so you are not surprised by it:
51
51
 
52
- - **A budget.** Your game's achievements may be worth at most **1,000 points** in total, and your
53
- game may have at most **200 achievements** over its life — both counting ones you have since
54
- removed, so retiring an achievement never frees room for another. Points are identity, not
52
+ - **A budget, set by the platform.** The platform limits the points your game's achievements may
53
+ award in total, how many achievements it may release, how many of them may award an icon and how
54
+ many distinct icons, how many one upload may declare, and how many items your game may own. It
55
+ can change any of those numbers, so none is written here: read your game's current limits, and
56
+ what it has used of each, with `gemctl achievement limits`, or from
57
+ `GET /v1/games/{game_id}/achievements/limits`. That endpoint answers an open map,
58
+ `{ game_id, limits: { <name>: { limit, used?, description } } }` — show every limit it returns,
59
+ not only the names you know, and read `description` for what each bounds. `used` can exceed
60
+ `limit` when the platform lowers one: nothing released is taken back, and nothing new fits until
61
+ usage is under it again. The budgets on points, achievements and icons are **lifetime**: they
62
+ count every achievement your game has put on the `release` channel, including ones you have since
63
+ removed, so retiring an achievement never frees room for another, and a config on `dev` or `test`
64
+ uses nothing. The item limit counts the items your game has now, and deleting a `failed` one frees
65
+ its slot. Points are identity, not
55
66
  currency — a player cannot spend them, and a game cannot mint them freely.
56
67
  - **Nothing in your config may put value into its progression.** An achievement that awards
57
68
  points or rewards may not sit on a progression that a recipe's cost or grant, a loot-table
@@ -73,10 +84,66 @@ What the upload enforces, so you are not surprised by it:
73
84
 
74
85
  - **Released achievements are fixed.** Once a release carries an achievement, its `points`,
75
86
  `rewards`, `visibility` and _where it sits_ — which progression, which level, and that threshold —
76
- cannot change. Its copy can. Removing it retires it: players who hold it keep it, and its points
77
- still count against your budget.
87
+ cannot change. Its copy can. Removing it retires it: players who hold it keep it, and it still
88
+ counts against every budget.
78
89
  - **The text is screened.** Copy that impersonates the platform or its staff is refused, and the
79
90
  refusal names the rule it broke.
91
+ - **`icon_url` is refused.** The platform does not host list art for achievements, so leave the
92
+ field out. An achievement awards an icon through `rewards`, below.
93
+
94
+ ### Awarding items (rewards)
95
+
96
+ An achievement can award items when it unlocks, listed in its `rewards` by slug. These are platform
97
+ items the player wears across the arcade, not your game's currency or inventory — those belong in
98
+ the threshold's own payout — a level's `rewards` or the progression's `rewards_on_complete` — which
99
+ is a different list (§3). Each `rewards[].item` names exactly one of:
100
+
101
+ - **One of your game's own items, whose art is `ready`.** Usually an avatar icon: the player earns
102
+ it in your game and can wear it anywhere on the arcade, as their portrait or as one of their
103
+ badges. You upload it with `gemctl item upload`; it is never written in the config file. A game
104
+ item can also be a text-only title — gemctl does not create one, but one your game already has
105
+ (see `gemctl item list`) is named the same way.
106
+ - **A platform name-style preset open to games** — a name colour (`preset-color-…`) or a name
107
+ animation (`preset-anim-…`). The platform owns these, so there is nothing to upload.
108
+
109
+ The workflow for art of your own is **upload it → wait until it is `ready` → name its slug in
110
+ `rewards` → upload and promote the config**:
111
+
112
+ ```bash
113
+ gemctl achievement limits # the item and icon limits, and what this game has used
114
+ gemctl item upload icon.png --slug first-clear --name "First Clear" # waits until ready
115
+ gemctl config upload --wait # the config that names first-clear in rewards
116
+ ```
117
+
118
+ ```yaml
119
+ - achievement:
120
+ id: 91ac…
121
+ points: 20
122
+ display_name: Getting the Hang of It
123
+ description: Clear 10 boards.
124
+ rewards:
125
+ - item: first-clear # your game's own icon, uploaded above
126
+ - item: preset-color-ember # a platform name colour
127
+ ```
128
+
129
+ - **What the upload refuses in `rewards`:** a slug that names no item your game may award — another
130
+ game's item and every platform item not open to games answer the same way, as unknown — one of
131
+ your own items still `processing`, `failed` or taken down, and the same slug twice. How many items
132
+ one achievement may award is in `gemctl config schema`.
133
+ - **`preset-` is reserved.** Your own items can never take a slug starting with it — the platform
134
+ and `gemctl item upload` refuse one — so a slug can never name both your item and a preset.
135
+ - **Rewards are fixed at release.** The slugs are resolved to items when the achievement first
136
+ reaches `release`, and its `rewards` cannot change afterwards. A later rename, takedown or new
137
+ preset never changes what it awards.
138
+ - **Icons count against the icon budgets** — how many achievements may award an icon, and how many
139
+ distinct icons your game may award — and every item you upload counts against your game's item
140
+ limit, a `failed` one until you delete it. Titles and name styles cost nothing against the icon
141
+ budgets. `gemctl achievement limits` reports each limit and what your game has used.
142
+ - **A hidden achievement withholds its rewards**, like its name and description, until the player
143
+ unlocks it.
144
+
145
+ The image rules, who may upload and what to do about a `failed` item are in the gemctl `game-config`
146
+ skill.
80
147
 
81
148
  ## 2. Who unlocks it
82
149