Notification
A Notification is a notification type — one of the entries in the player’s settings menu. Modders adding new alert types create new notification entries.
Inheritance: dbdata → notification.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
.id | string | Notification id |
.name | string | Display name in settings |
.rawname | string | Raw text entry reference |
.description | string | Description (tooltip) |
.active | bool | Player has this notification enabled |
Common patterns
Section titled “Common patterns””Check if player wants to see a specific notification”
Section titled “”Check if player wants to see a specific notification””<do_if value="notification.shipdestroyed.active"> <write_to_logbook text="'Ship destroyed: ' + $Ship.knownname"/></do_if>Skips the write if player has disabled the notification type — respects user preferences.
Common gotchas
Section titled “Common gotchas”- ⚠
.activeis a per-player preference. Vanilla’s notification cues check this before displaying messages. Custom mods should do the same. - ⚠ Notifications are db-defined. Add new types via data files; runtime code only reads
notification.X.active. - ⚠ Reading
.activeis fine; writing isn’t. Player toggles via settings UI, not via MD actions.
Related
Section titled “Related”- All vanilla notification cues — see
notifications.xml(~4000 lines) for canonical usage. - Settings UI — exposes
.activeto the player.