Skip to content

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.

PropertyTypeDescription
.idstringNotification id
.namestringDisplay name in settings
.rawnamestringRaw text entry reference
.descriptionstringDescription (tooltip)
.activeboolPlayer has this notification enabled

”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.

  • .active is 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 .active is fine; writing isn’t. Player toggles via settings UI, not via MD actions.
  • All vanilla notification cues — see notifications.xml (~4000 lines) for canonical usage.
  • Settings UI — exposes .active to the player.