# Add achievements

> Make the list of achievements on the Project screen and unlock them in the scenario, including achievements that count and the completion rate in Extras

Achievements are records that unlock when the player sees a particular scene and so on. You make the list on the Project screen and write where they unlock in the scenario. Unlocked achievements can be viewed under "Achievements" in "Extras" on the title screen.

The examples on this page use the project you make in the [tutorial](/en/tutorial/), "Shiori of the Library."

## Make the list of achievements

1. Click the project button at the top left of the screen, and click "Extras" at the top right.
2. Click "＋ Add" under "Achievements" at the bottom.
3. Enter the name to use in the scenario in "Name," and the text to show players in "Title" and "Description."

![The list of achievements. The second one is hidden until it's unlocked.](/shots/en/h-achievements-list.webp)

Check "Hide until unlocked" to hide the title and description until the achievement is unlocked. With "Icon," you can choose a picture for the achievement from the "Images" assets.

## Unlock it in the scenario

1. On the "Script" screen, switch to the block view and select the line where you want to unlock the achievement.
2. Type "achievement" in the search box at the top of the parts panel, and double-click "Achievement" in the results.
3. In the panel on the right, enter the achievement name (`first_visit` here) in `id`.

![The Achievement part, with the achievement name entered in id.](/shots/en/h-achievements-achieve.webp)

When the game reaches that line, a notice appears at the top of the screen. The notice appears only the first time the achievement is unlocked.

![The notice shown when an achievement is unlocked.](/shots/en/h-achievements-toast.webp)

"Achievements" in Extras shows how many are unlocked, and the date and time each one was unlocked.

![Achievements in Extras. Under the heading are the completion rate and the counts for read text, endings and achievements; the second achievement hasn't been unlocked yet, so it's hidden.](/shots/en/h-achievements-extra.webp)

## Achievements that count

You can also make achievements that unlock by counting, such as "Borrowed 3 books."

1. In "Extras" on the Project screen, enter a number in "Count to reach" for the achievement (`3` here).
2. In the scenario, select the line where you want to advance the count, type "achievement" in the search box at the top of the parts panel, and double-click "Advance achievement" in the results. In the panel on the right, enter the achievement name (`borrow_three` here) in `id`, and the amount to add in `add` (1 if empty).

![The Advance achievement part, with borrow_three entered in id.](/shots/en/h-achievements-progress.webp)

Each time the game reaches that line, the count goes up by `add`, and when it reaches the goal, the achievement unlocks and the notice appears. The count is shared by all saves. In "Achievements" in Extras, achievements not yet unlocked show "current count / goal."

## Unlock by the number of endings seen

For an achievement that unlocks by the number of endings seen, such as "Saw 3 bad endings," write `endings` (the kind of ending) and `goal` in the achievement in liminalia.json.

```json
{ "id": "all_bad", "title": "End of Sleep", "endings": "bad", "goal": 3 }
```

Each time a playthrough ends with `@title-screen ending=bad`, the count becomes the number of `bad` endings seen (the same ending counts once however often it's seen), and the achievement unlocks when it reaches 3. You don't need "Advance achievement" in the scenario. With `"endings": "*"`, every kind counts.

Expressions can read the same count with `endings("bad")` (`endings()` for all of them). For example, a branch on the title screen can use `@if endings() >= 5`.

## Completion rate

Under the heading of the Extras screen is the completion rate (the "Completion" row in the picture of Achievements in Extras above). It shows the counts for read text, CGs, replays, endings and achievements, and the overall completion rate. You don't need to write anything in the project. Read text and endings are counted from the flowchart made from the scenario.

## Link with Steam achievements

When you distribute the desktop version on Steam, unlocked achievements are also sent to Steam achievements. If an achievement name differs from the achievement API name set in Steamworks, write the mapping on the Project screen.

1. Click "Export" at the top right of the Project screen, and scroll down to "Steam."
2. Enter your Steam app ID in "App ID."
3. Under "Achievement names," which then appears, enter the achievement name in the left field and the API name in the right field, and click "＋ Add."

![Steam in the Export section, with a pair of an achievement name and an API name added.](/shots/en/h-achievements-steam.webp)

You don't need to write achievements whose name and API name are the same. For achievements that count, write the Steamworks stat API name in "Stats for counted achievements" to send the progress as well.

To send them to Game Center and Google Play Games on the smartphone versions, see [Release on smartphone app stores](/en/howto/store-mobile/).

## In code

```
Shiori "I'm Shiori. I help keep the books in order here."
@achieve first_visit
Shiori "Would you like to borrow a book before you go?"
```

For details, see [@achieve](/en/reference/achieve/) and [@achieve-progress](/en/reference/achieve-progress/).
