Make a codex
On this page
Character profiles and explanations of terms can be collected in a codex (data/codex.json). The codex appears in the game’s menu and in Extras, and its entries open as the story progresses. You can also split an entry’s text into sections and open them a little at a time.
The examples on this page use the project you make in the tutorial, “Shiori of the Library.”
Make the codex file
- Click “Plugins” at the top of the screen, and choose “Codex” under “Data” on the left.
- If the file doesn’t exist yet, click “Create.”

- Enter the codex’s name in “Screen title” (“Library Records” here).
- Add categories such as people and books with ”+ Add” under “Categories,” and enter “Id” and “Label.”
- Add entries with ”+ Add” under “Entries,” and enter “Id” (the name used from the scenario), “Category,” “Title” (the name shown in the codex), “Reading,” “Image” and the sections of text.

What you enter is saved automatically after a short wait.
A category’s “Layout” can be a timeline (entries ordered by their “Timeline date” and “Timeline order”), a relations chart (entries placed at their “X” and “Y,” with “Relations” drawn as lines) or a map (entries placed on the category’s “Map image”).
Conditions for opening entries
If you write a condition expression (if) on an entry, the entry opens when the expression becomes true. Here, the entry for the borrowed book has a condition like game.book == "book of fairy tales". The conditions are checked each time a page is shown, and newly opened entries are announced at the edge of the screen.
Entries without a condition open when the game reaches a “Codex entry” part (@codex-unlock) placed in the scenario. Here, it’s placed after the line where Shiori gives her name, to open Shiori’s entry.
Sections can have conditions too. Sections without a condition open together with the entry, and sections with a condition open when it becomes true. A locked section opens when you enter the section’s name in section of “Codex entry.”
Open the codex in the game
The codex opens from “Library Records” (the name you entered in “Screen title”) in the game’s menu. To open it from the scenario, place an “Open codex” part (@codex). Enter an entry name in id to open that entry.


Entries not read yet are marked “New.” During play, it shows the entries opened in that playthrough, and from Extras, it shows the entries opened in any save.
Edit plugin data with a form too
Besides the codex and investigation, “Data” on the “Plugins” screen also lists forms for data whose shape a project plugin declares. You choose assets from a list, and reorder lists with ↑ and ↓. When you rename a scene, asset or variable in Studio, the names in data with a declared shape are rewritten too. How to declare the shape is described in “Project data shapes” in Writing plugins.
In code
@codex-unlock shiori
@codex shiori
{
"title": "Library Records",
"categories": [{ "id": "people", "label": "People" }, { "id": "books", "label": "Books", "sort": "reading" }],
"entries": [
{
"id": "shiori", "category": "people", "title": "Shiori", "reading": "shiori",
"sections": [
{ "text": "She helps keep the books in order in the library after school." },
{ "id": "tales", "title": "Favorite book", "text": "She seems to have read fairy tales all the time when she was little.", "if": "game.book == \"book of fairy tales\"" }
]
}
]
}
For details, see @codex and @codex-unlock.