Virtual Navigation and Preview
Language: English · Українська
The left Blocks tree mixes physical files with derived views. Built in ui/updaters/block_list_updater.py. Physical rows are the source of truth for save/load. Virtual folders only group existing strings.
Physical tree
- Nested folders. Compacted archive paths look like
bmgres4.arc / zel_00.bmg. - Warning ticks (coloured gutter) and
(N)issue counts on files and compacted rows. Tick data is stored on the item (UserRole+20) so labels are not doubled asName (1) (1). - Unsaved
*on files and parents. - Green progress fill: translation completion. Empty / whitespace / tag-only originals do not count.
- Show Unsaved Only above the tree hides files with no unsaved edits. Session-only: a restart always unchecks it (
AppDataStore.from_snapshotforces both unsaved filters off).
Expanding or collapsing a physical folder only stores open/closed state. It does not rebuild the whole tree or re-populate every block.
Clicking a physical file (UserRole >= 0) always loads that file’s strings, even if a parent looks like an aggregate.
Derived roots
Stable names on UserRole+4:
| Root | Meaning |
|---|---|
| Story | Acts / chapters / scenes from MemePalace + Chapter combo |
| Speakers | Lines grouped by resolved speaker, plus None for unassigned non-empty lines |
| Items | Item-get / catalogue copy linked to reference items |
| Windows | Grouped by in-game message-window kind |
| Notated | Lines with an explicit translator note (UserRole == -5) |
Empty BMG padding stays in the physical file. Virtual roots skip blank rows (_is_blank_row). A kind that would only contain blanks does not appear.
Clicking a virtual leaf loads only its mapped (block, string) rows.
⟳ Rebuild virtual folders on the tree toolbar rebuilds Speakers / Chapters / Items from current story data. Translation files are not touched.
Dropping strings onto a virtual leaf assigns that facet (speaker, chapter, …). Chapters root and Act folders have no right-click menu.
Plugin folders
A plugin can add folders under a physical block (get_virtual_folders). They sit below the block, and their item has UserRole == -2 with the aggregate marker, so a click fills the strings list with the folder's rows, as for the derived roots. The 3DS manuals use them: under each manual Small text and Large text (one subfolder per page), Sections (per page: its small and large strings) and Contents (the section titles). A string sits in two places. A page's name is its index entry's current translation, or the original when that is blank, or "Page N". The names refresh when the tree rebuilds (after a save, or a project change), not on each keystroke. Selecting a folder keeps its place across a rebuild. Plugin folders cannot be dragged, and a drop on one does nothing: dragging a folder onto a speaker would assign the whole manual.
Strings list vs editor
- Click a line in Strings in block to bind Original + Editable.
- Hide empty strings collapses consecutive empties to a placeholder (this filter is restored from session).
- Show Unsaved Only on the strings list is not restored.
- Show Warnings Only + Warnings: X / Y uses Detection-enabled problem ids from the plugin.
Visual preview
View → Preview (Ctrl+Shift+P), also the toolbar Preview action. Under Editable: BfnPreviewWidget + BfnPreviewWindowBar.
When the plugin declares message_window_preview (Twilight Princess BMG), the preview can draw talk / item-get / sign chrome from a local game dump. The repo does not ship Nintendo assets. Page n/N and original/translation (T/O) sit on that bar.
Boss name cards follow zelda_boss_name.blo (sfont00 600×77, ruby 34px, centered). {scale:…} in the string still applies.
Global → Enable Live Preview turns the live simulator off to reduce lag.
Preview scaling and layout: The preview starts by fitting the message window to the available space. With a background image visible, the image, frame, and text share the same game-coordinate transform; Ctrl+Wheel zooms them together, and Reset Scale (100%) restores 100% zoom while retaining any pan offset. Pan offsets apply only while the background is visible. Fix Font Scale restores the chosen text scale on reopening and adjusts it proportionally when the panel is resized. The sidebar reduces button sizes on compact panels, and warning tooltips show a colored dot beside each warning name.
Do not expect TP window frames without a legal local dump and the Zelda BMG plugin.
Story Context fields
Above Editable: Window:, Chapter:, Speaker:, Font / Max-width. Same assignments the virtual folders read.
- Double-click Window: → physical game block.
- Double-click Chapter: → virtual Chapter.
- Double-click Speaker: → virtual Speaker or Item.
Nonein Speaker clears the assignment.
Do not invent speakers for empty padding slots; those rows are not in Speakers.