Define a set of achievements
define_achievementsDefine or update a game's achievement list in a single batch, keyed by slug so re-running publish scripts stays idempotent. Lists up to 100 achievements, applying entries in order.
Instructions
The batch form of define_achievement, and the one to reach for when you publish: hand it the full list your build unlocks against and it upserts every entry on (game, slug), so re-running your publish script changes nothing. Slot it into the chain right after upload_game_build — create_game → upload_game_build → define_achievements → add_screenshot → set_cover → publish_game. The slugs you send here are exactly the strings your game passes to Arcade.achievements.unlock(); anything else the build asks for is refused. Entries are applied in order and a game may hold 100, so an oversized set fails on the first entry that will not fit — the ones before it are already saved, and re-sending the trimmed list is safe. Nothing is deleted: a slug you leave out stays defined, so use delete_achievement to retire one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game | Yes | The game, by slug (e.g. "orbital-drift") or by id (uuid). | |
| achievements | Yes | The definitions, in the order you want them displayed. Each needs at least `slug` and `name`; `description`, `emoji`, `hidden` and `points` are optional and have sane defaults. |