A glue Lua state with the reference glue surface, events and ModelFFX (#963)

The first piece of running the stock GlueXML: benilla had no glue Lua state, and no reference data for its surface.

In 1.12.1 the glue state holds the base set (`0x7039e0`) and seven registrars (`0x46abb0`): 119 functions, 105 of them glue-only, with 26 glue events (`0xb41e70`, `0x46a88f`). `RegisterEvent` matches names case-insensitively and drops an unknown one (`0x702140`). The glue builds the 13 base frame types plus `ModelFFX` (`0x46a4fe`), a Model with its own show and paint (`0x46fa00`); the in-game types come only at world entry (`0x495940`).

`reference/` gains the glue event and surface tables, generated and checked against the shapes table. `UiScript::new_glue()` builds that state; a gate holds its globals to the table, with the 108 unbuilt names listed. Nothing in the app changes yet.

Part of #856

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sam Sung
2026-10-12 07:38:02 +07:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 985dabff44
commit a9dd325bb7
20 changed files with 1449 additions and 214 deletions
+21
View File
@@ -81,3 +81,24 @@ Reading it: `crates/benilla-app/src/ui_script/verb_event_gate.rs` is the gate. F
verb benilla registers, the module that registers the verb fires the event, or the pair is declared
there: `ELSEWHERE` (a feed fires it on the state the verb changes, and the named file is checked
too) or `GAP` (nothing does, with the reason).
## `1.12-glue-events.tsv` and `1.12-glue-surface.tsv`
The glue screens' own FrameScript state. The glue builder (`0x46a7b0`) gives Lua a different
surface and a different event table from the in-game state's, and GlueXML runs against those.
`1.12-glue-events.tsv` is the 26-entry event table (`0xb41e70`) the builder loads in place of the
in-game one (`0x703d90` at `0x46a88f`), so a glue event's id names a different event in-game. It is
vendored from the client's bytes, as `1.12-event-catalog.tsv` is.
`1.12-glue-surface.tsv` is every function in the glue state's `_G` before GlueXML loads: the base
set both states share (`0x7039e0`), the three registrars the in-game state calls too, and the four
glue-only tables, with each glue verb's in-game namesake and the six whose shape differs from it.
Regenerating: `scripts/gen-reference-glue-surface.py`, from the shapes and globals tables, so it
reproduces the committed file from any clone.
Reading them: `crates/benilla-ui/src/script/tests/glue_surface.rs` holds the surface table to the
shapes table, row for row by `table_va`, and the glue VM (`UiScript::new_glue`) to the surface table:
every function it exposes is a glue-state one, and every glue-state function it lacks is on the
file's `NOT_YET` list, which only shrinks. The same file holds the VM's event table to
`1.12-glue-events.tsv`.