UI ​

You add screens to F1 25 through swofty_core, which uses the engine's own screen loader. To add a screen and a home tile, follow the in-game UI tutorial.

Screens ​

To tell the loader about your screens, list each one in operations.screens in swofty.json:

json
"screens": [{ "name": "my_page", "file": "ui/my_page.ui", "flow": "flow_options", "anchor": "settings_container", "view_model": false }]
FieldDefaultMeaning
nameYour screen's route. Use [a-z0-9_] and keep it unique across the profile's addons
fileYour screen's raw .ui data, relative to the addon folder
flowflow_frontendThe flow that loads the screen
anchorA game screen in the same flow. Your screen registers after that game screen's resource loads
view_modelfalseAsk swofty_core for a native view model

The build installs each file as swofty/ui/<name>.ui and lists it in the ui block of swofty/settings.json. When the flow loads, swofty_core registers each listed screen. If the engine rejects any nodes, swofty_core logs each one with the reason.

A route to an unregistered addon screen is cancelled, reopening the last screen. When naming yours, leave swofty_settings, swofty_addon_<n> and swofty_map_<n> alone: they're reserved for ADDON SETTINGS.

ADDON SETTINGS ​

Each time you build the profile, the launcher generates ADDON SETTINGS from the game's own screens. Here's what goes on each page:

ScreenHolds
swofty_settingsOne tile per enabled addon and track: name, author, version, description
swofty_addon_<n>The page for addons[n] of swofty/settings.json: one row per option
swofty_map_<n>A track's code, author and version

To open ADDON SETTINGS, its home tile routes to mod_menu.

View models ​

Set "view_model": true to request a view model for your screen. You'll get one only if swofty_core has a view model whose prefix matches your screen's name; it registers that model under view_model_data.<screen>. swofty_core ships one view model, for swofty_addon_ pages, with these properties:

PropertyValue
titleThe addon's name
o<k>.labelOption k's label
o<k>.textThe option's current value, as displayed
o<k>.index, o<k>.valueIts current value's index
o<k>.min, o<k>.max, o<k>.stepThe index range: 0, the last index and 1
o<k>.is_slidertrue for a slider

Use these commands to change options, enable or disable an addon, or restart the game:

CommandEffect
swofty_next:<addon>:<option>Select the next value
swofty_prev:<addon>:<option>Select the previous value
swofty_set:<addon>:<option>:<index>Select value number index
swofty_enable:<addon>:<0 or 1>Turn the addon off or on
swofty_restartClose the game so the launcher rebuilds and relaunches it

Home tiles ​

To build tiles for the home screen, use these Game API bindings:

BindingUse
FeTile_Build_ListBuilds a tile list
site_FeHome_AfterCareerCallThe instruction after the Career tile is added. r14 is the TileList *
FeHome_Add_CareerTileAppends a Career tile to a list
FeTile_ItemBase_PopulateA tile's base populate
FeHome_Handle_CommandHandles a home-screen command
Vm_Set_String, Vm_Set_BoolSet a view-model property
g_Vm_RegistryThe view-model registry
Ne_Make_StrFromCStrMakes an engine string

A tile is a HomeItem. Its virtual table has populate in slot 4 and get_action in slot 5; you can replace both for one tile with swofty::subclass. To choose where the tile takes you, get_action returns an Action of type 1 whose str is the route to open.

UI patches ​

UI patches let you edit the game's own screens, routes and UI databases, but the build does not apply them yet.

Publishing