LiminaliaLiminalia
Technical docs: HTML templates for the built-in screens

HTML templates for the built-in screens

Open in Claude (new tab)

The built-in system screens (confirmation, menu, save and load, backlog, title and so on) are written as HTML templates with attributes that name what each element does (data-role and so on). A game copies a template into its own folder and edits it with only HTML and CSS. For elements with attributes, the engine adds what pressing does, keys, gamepad, focus and text-to-speech. Only people who want to write JavaScript do so, either in a screen JS file placed next to the template (“Screen JS” below) or, as before, in a plugin’s screens.*.

This document is the design for 0.4.0. The confirmation screen (confirm) was built this way first (the prototype), stage f1 rewrote the menu, controls help, ending name and choices, stage f2 rewrote save and load, backlog and title, and stage f3 rewrote the settings screen. That is the last screen rewritten in 0.4.0. Copying, the difference from the built-in template, and going back to the built-in template are in lim screens, the MCP tools, and the template editor of “Game screens” in Liminalia Studio (“Copying” below and studio.md). Checking a game’s templates (lim check and the Studio check) is in “Checking templates” below.

Names: wording shown to creators and documents for creators say “template” and “attribute” (the rule against coined words in docs/design/wording.md in the repository, in Japanese). Comments in the code also say “型” (template) and “印” (attribute).

  1. Template format and loading
  2. Using templates from a game
  3. Parts and attributes by screen
  4. Checks and remaining work