Menus and UI ​
Every menu screen in F1 25 is a .ui resource (the widgets) attached to a scene (an .idf layout) in the game's UI archives; an addon changes a menu by shipping edited copies that the launcher builds into the archives when it builds a profile, so the game's own files stay stock.
A menu edit in full ​
swofty.rnd-tyres-thermal adds a fifth R&D department. Its R&D overview gets a fifth tile: tile_5 was cloned from tile_4 in Swofty UI, exported, and shipped with one replace-resource per archive that holds the scene:
swofty.rnd-tyres-thermal/
├── swofty.json
├── erp/
│ └── rnd_fifth_pie.json # the operations Swofty UI exported (rnd_overview.erp.json)
└── ui/
└── rnd_overview.idf # the exported scene// trimmed to the menu edit; the real manifest also lists database, assets and native operations
{
"schema_version": 1,
"id": "swofty.rnd-tyres-thermal",
"name": "R&D: Tyres & Thermal Management",
"version": "0.11.0",
"kind": ["database", "erp", "native"],
"compat": { "game": "f1_25", "game_builds": [">=25251167"], "launcher": ">=1.0.9" },
"operations": {
"erp": ["erp/rnd_fifth_pie.json"]
}
}{
"schema_version": 1,
"ops": [
{
"op": "replace-resource",
"erp": "2025_asset_groups/ui_package/flow_career_hub.erp",
"resource": "eaid://ui_package/art/screens/career/rnd_overview.idf",
"source": "ui/rnd_overview.idf"
},
{
"op": "replace-resource",
"erp": "2025_asset_groups/ui_package/flow_team_hq.erp",
"resource": "eaid://ui_package/art/screens/career/rnd_overview.idf",
"source": "ui/rnd_overview.idf"
}
// … the edited laptop_r_and_d.ui and the fifth pie's new scenes, meshes and textures follow
]
}The exported scene carries the new element with its ids already correct:
python3 tools/idf.py tree ui/rnd_overview.idf | grep tile_ 'tile_4' [eXRef] pos=(-4.34812, 0.813113, 0) scale=(0.999096, 0.999096, 1) id=2861292184
'tile_5' [eXRef] pos=(-0.001875, 0.813113, 0) scale=(0.999096, 0.999096, 1) id=1536372253swofty build checks that the scene was saved from the same .idf, writes it into both archives, and says how it delivers a scene whose size changed:
erp: 2025_asset_groups/ui_package/flow_career_hub.erp built into the game files; 1 resource(s) change their stock layout, which the in-game loader cannot load, such as eaid://ui_package/art/screens/career/rnd_overview.idf: fragment 0 is 30108 bytes, the stock one 29596; stock archives that bind to the replacement read it with the stock layouttile_5 stays empty in game until a .ui node attaches to its name. The addon also ships an edited laptop_r_and_d.ui and a native plugin that publishes the fifth department's data.
Edit a menu ​
- Find the scene. Open Swofty UI, press Ctrl+K and search for the screen (Open the scene).
- Edit and preview it. Move, resize, clone, rename or delete elements; Swofty UI draws the scene with the game's textures as you go (Edit it).
- Export it. Export writes the checked
.idfand thereplace-resourceoperations for every archive that holds it (Export). - Ship it in an addon. List the operations file under
operations.erpinswofty.json(Add it to your addon). Pick the route from Ways to ship a menu change. - Test it and debug it live. Build, play, and read
swofty/loader.log; when a count or position is fixed in native code, trace it with gdb (Build and play, Techniques, Debugging live). For a.uiedit, follow Make a safe UI edit.
Ways to ship a menu change ​
- A moved, resized or added element:
replace-resourcein anerpoperation file, with the exported.idf(Editing menus, ERP operations). - A cloned tooltip, label or list entry in a
!pkgresource:patch-pkgin anerpoperation file, withclone-entryandset-value(ERP operations). - A new screen:
operations.screens, with a.uifile (In-game UI). - A new home tile: a site mixin in an engine plugin (In-game UI).
- Settings for your addon:
options; ADDON SETTINGS builds the page (Settings). - Edits to screens, routes and UI databases by node:
operations.uipatches. The build skips them for now (UI patches).
Make a safe UI edit ​
The game rejects a .ui node it can't load without writing a log line. A rejected node takes down its whole screen and every later screen of the same .ui, or its whole template instance; a tab whose content template is rejected loses its content. UI engine internals lists every check and what each failure takes down.
Start from the stock resource. Edit a copy of the stock
.uior.idfand keep every node, property and behaviour you don't mean to change. Properties the engine reads stay required: a node that lists theNBVNbehaviour needs itsvisualNavproperty, and a list control needsdatabound to an array (What rejects a node).json// the stock dynamic_era_select root; drop this while slot 6 still lists NBVN and every instance fails "visualNav": { "xOffset": 0, "yOffset": 0 }Keep the ids and references in step. Recompute node ids and signal hashes after renaming or moving a node; the engine reads only the hashes. Retarget an
eXRefby settingfileRefandxreftogether (References).Check the build. Run the checks on each stock archive and the archive your build writes in its place:
shcargo run --release -p swofty-core --example ui_check -- <stock.erp>=<built.erp>Hard findings cite the engine rule, its error code, what a failure takes down and the function address, and stop an addon build. Warnings list what no stock file does (Checking UI edits).
Look up what stock does. UI node reference lists, per node type, the properties, commands, events, pins and layout bindings stock files use; UI patterns shows how stock screens combine them.
Trace a runtime failure. A failure the checks pass, such as an ordering or binding problem, shows in the live trace:
re/tools/ui_trace/ui_template_trace.shattaches gdb to the running game and prints every rejected template node, failed instance and tab miss with its error code (Live trace, Debugging live).
The map ​
- UI scenes (.idf): the scene format.
- Where scenes live:
UILayoutresources in2025_asset_groups/ui_package/, often in several archives. - The container and elements:
scenelist, element keys and classes. - Identity: componentId, elementId,
nodeidlookupandxref. - References: an
eXRefloads byxref, not byfileRef. - How a screen attaches: by componentId and by leaf name.
- What a scene stores, and what animations and stackers replace.
- Tools:
tools/idf.py.
- Where scenes live:
- Swofty UI: the scene viewer and editor.
- Get it and start it: release binary or
tools/swofty-ui/serve.py, the game folder, options. - The window, references and edits.
- Export, its checks, and
--check-refs. - Keyboard and mouse.
- HTTP API: open, apply, export and replay edits from scripts.
- Get it and start it: release binary or
- Editing menus with an addon: one scene from Swofty UI to the game, step by step, and its limits.
- Techniques: tracing what draws an element, data limits against screen limits, counts fixed in native code, patching native builders safely, the test loop, and a checklist for AI agents.
- Debugging live: gdb on the running game under Proton or Wine: tracepoints, watchpoints, reading memory.
- UI node reference: every stock node type and scene element type, with properties, commands, events, pins, wiring and layout bindings.
- UI patterns: how stock screens combine nodes.
- Tab containers, multi-row lists, navigation between rows, focus and input blocking, masks, runtime bindings.
- Checking UI edits: engine rules, format checks, warnings, where the checks run.
- UI engine internals: what the game does with a
.ui.