Any mod can add its own screen to Hermes' dock and Apps grid — the same extension point every app we ship (Home, Notes, Journal, Calendar, Reminders, Apps itself) goes through internally.
Registering your app
Declare x-lifestyle-hermes in your own mod's requiredMods, feature-detect the registry, and register once at your script's own load time:
js
if (window.BMFT && window.BMFT.Hermes && window.BMFT.Hermes.Apps) {
window.BMFT.Hermes.Apps.register({
id: "fitness-log", // required, unique -- duplicates throw
label: "Fitness Log", // required
render: renderFitnessScreen, // required -- owns screenEl.innerHTML while your app is open
icon: { svg, tileFrom, tileTo }, // optional -- omit it and you still get a labeled fallback tile, not a blank one
order: 50, // optional -- dock position, ascending; omitted appends after everything else
pinnable: true, // optional -- lets a player favorite/unfavorite your app on and off the dock
dockExcluded: false, // optional -- true means Apps-screen-only, never reaches the dock at all, even if pinnable
dockBadgeCount: () => 3, // optional -- a live counter badge on your own dock tile
goBack: (screenEl) => false, // optional -- handle your own sub-level navigation on the shell's Back button
});
}render(screenEl) is called with the shell's screen container every time your dock tile is tapped, and owns that element's innerHTML until the next render. goBack/dockBadgeCount/render are each called inside a try/catch at the call site — a throw degrades gracefully (blank screen, falls through to Home, or no badge) and logs a warning, instead of taking the whole dock down.
A few things worth knowing before you register:
- Ids aren't namespaced. We only reject an exact duplicate
id, so pick something specific to your own mod (your-mod-fitness-log, notnotes) rather than risk colliding with a future built-in app. - The favorite cap is shared. Every
pinnable: trueapp — built-in or third-party — competes for the same small pool of dock favorite slots, first-come. defaultFavoritedonly sticks for our own built-in apps. A third-party app can't force itself onto every player's dock unasked; the flag is silently ignored for any id we didn't ship ourselves.- Built-in apps always sort ahead of third-party ones, on the dock and in the Apps screen's grids alike — your own
orderonly breaks ties among other third-party apps, it can't push you ahead of a built-in app no matter how low you set it. dockExcludedis not the same aspinnable+defaultFavorited: false. The latter (Journal's own shape) starts off the dock but the player can still favorite it on later.dockExcluded: truemeans never, full stop — your app only ever shows in the Apps screen's grid.