# Liminalia Studio

## Project and plugins

**Project** is the standard screen for settings that concern the whole project (other than the game settings), switched with the switch to the right of the heading.
- Basics, Export: the top level of liminalia.json (`project-settings.ts`). Field names are tied to their inputs with `<label>`. Among the basics, fields you don't change in normal work
  (Call after loading, Allow @script, Protect saves from tampering, Folders, Import) are collapsed under "Advanced settings" at the end
  (when the export screen opens one of those fields, it is expanded even if collapsed)
- Extras: builds the lists in `extra` of liminalia.json (CG, recollections, music, achievements). Images and tracks are chosen from the asset lists, and a recollection's start position from the script files and labels
- Translation: add and remove playable languages (`languages`; the first is the language of the original), and write translations of the text, choices, speaker names and the game data text (the translatable fields of `data/*.json`, shown with the data file and the place in it) for each language (`lang/<language>.json`).
  Opening it syncs with the current script (new lines are added with empty translations, and translations no longer used are carried over or kept; the same as `lim i18n`; just opening doesn't save to the file, and it is saved in this form when you edit a translation), and lists what isn't translated yet
  100 at a time. Lines whose original was rewritten show the previous translation, which you can click to put into the translation field. Click a location to go to that script. The number translated is shown for each language
  (for languages that list system screen text, the script translations and the system screen text are counted separately, and the list is narrowed by "Script" and "System screen text" the same way).
  Lines with a fixed line ID whose original changed after they were translated (`translatedFrom`) show the original at the time of translation; type the translation again, or remove the mark with "Keep this translation"
  (if there are any, "Source changed" narrows the list to them). For languages other than Japanese and English, the system screen text (`ui`, with the English original) is listed in the same list.
  Renaming a script also rewrites the translation keys
Extras and languages take effect in any open player without a restart.

**Plugins** lists "All plugins" in the left panel along with the screens added by project plugins (`./studio`, grouped by plugin; [plugins.md](../plugins.md#制作画面studio)),
and opens the chosen one on the right (the last one opened is remembered).
- All plugins: the `plugins` list. It shows the name, version, entry points (custom commands, rendering, import, Studio) and the custom commands added, and lets you reorder and remove plugins (the folder stays).
  For plugins inside the project folder, you can edit the name and description (package.json) and open the folder in the OS file browser (installed packages aren't rewritten)
- Create new: choose a name (lowercase letters, digits, -) and the entry points (commands always, rendering and Studio optional), and it makes a small working sample in `plugins/<name>`
  (`@<name>-hello`; with rendering, it shows text on the screen; with Studio, it adds one screen) and adds it to the end of `plugins`
- Add an existing plugin: a plugin folder (a path relative to the project folder, `./plugins/…`, or the absolute path of a folder outside the project) or
  the name of a package installed with `npm install` in the project folder. It only appends to plugins in liminalia.json and doesn't copy files. A plugin that can't be found isn't added.
  In the desktop app, "Choose folder…" lets you pick a folder in the OS folder picker and add it directly
- Official plugins: lists the plugins bundled with the app (currently AI consultation) with their name, description, entry points and version. "Install" copies one into `plugins/<id>` in the project and
  adds `./plugins/<id>` at the end of `plugins` (npm isn't used). If it is installed, it shows "Installed"; if the bundled version is newer, "Update to (version)";
  and if only the folder exists and it isn't in `plugins`, the installed version and "The folder is there, but it is not added to the project." For plugins whose bundled folder is missing (such as an app extracted for development; `CatalogPluginInfo.unavailable`),
  it shows only "Not included in this app," not as an error (the places it looked are in the console). "Reinstall" and update keep the previous content in `.liminalia/backups/plugins/<id>-<date-time>` (up to 3)
  and copy it again. If `plugins/<id>` holds a different package, it doesn't install. Where the list is kept and its shape: [plugins.md](../plugins.md#公式のプラグイン)
After changing the order of plugins, restart for it to take effect ("Restart" restarts the dev server in the desktop app).
