HUD and theme
The target is a player or dlmp.root, and the last write wins. A write to the root overwrites the widget for everyone and also applies to players who join later; a write to a player lasts until the next write to the root, and removing it does not restore the root's widget. Any resource may overwrite an entry and then owns it; stopping a resource removes only the entries it still owns.
ProgressSpec
Fields
valuenumber— Current fill of the bar, 0..1.to(optional)number— Fill the bar moves to on its own, 0..1; requiresduration_ms.duration_ms(optional)integer— Time to reachto.label(optional)stringcolor(optional)integer— Bar color, 0xRRGGBB; defaults to the theme's line color.
NotificationSpec
Fields
textstringcolor(optional)integer— 0xRRGGBB; defaults to the theme's text color.duration_ms(optional)integer— Defaults to 5000.
AnnouncementSpec
Fields
titlestring— Non-empty, up to 63 bytes, single line.subtitle(optional)string— Up to 127 bytes, single line.color(optional)integer— Title color, 0xRRGGBB; defaults to the theme's text color.duration_msinteger— 1..300000; the client hides the announcement on its own after this time.
CountdownSpec
Fields
duration_msinteger— 1..86400000.label(optional)string— Shown above the time; up to 63 bytes, single line.
StatusLineSpec
Fields
label(optional)string— What the value is; up to 31 bytes, single line.textstring— The value; non-empty, up to 63 bytes, single line.color(optional)integer— Value color, 0xRRGGBB; defaults to the theme's text color.
KillFeedEntry
Fields
killer(optional)Player— Omit for a death with no killer. The nick is captured at call time and stays in the row after the player leaves.victimPlayercauseinteger— 0..255: a weapon id or another cause fromplayer_death; a cause with no client icon is shown as a skull.
dlmp.show_announcement
Shows a centered title and subtitle, replacing the previous announcement. The client hides it after duration_ms.
Parameters
targetPlayer|ElementspecAnnouncementSpec
Returns ok boolean|nil, err string|nil
dlmp.hide_announcement
Parameters
Returns ok boolean|nil, err string|nil
dlmp.show_countdown
Starts a countdown, replacing the previous one. The client counts down on its own and hides it at zero. Reaching zero raises no event and ends nothing: keep your own timer for what follows.
Parameters
targetPlayer|ElementspecCountdownSpec
Returns ok boolean|nil, err string|nil
dlmp.hide_countdown
Parameters
Returns ok boolean|nil, err string|nil
dlmp.set_status_line
Sets a status line. Writing the same line again sends nothing, so a script may rewrite it every tick.
Parameters
targetPlayer|Elementslotinteger— 1..8, top to bottom.lineStatusLineSpec
Returns ok boolean|nil, err string|nil
dlmp.clear_status_line
Parameters
Returns ok boolean|nil, err string|nil
dlmp.add_kill_feed
Adds a kill feed row. The feed keeps the last five rows, and the client shows each for 15 seconds. The core does not post deaths on its own: call this from player_death. The row keeps the nicks and player colors as of the call.
Parameters
targetPlayer|ElemententryKillFeedEntry
Returns ok boolean|nil, err string|nil
dlmp.clear_kill_feed
Parameters
Returns ok boolean|nil, err string|nil
dlmp.show_progress
Shows a progress bar, replacing the previous one. With to and duration_ms, the client moves the bar to to on its own, in either direction, with no further packets: call again only when the course changes (for example, a capture stops or reverses). Reaching to raises no event and does not hide the bar: the gamemode tracks the time and hides it. For a bar that is not moving, repeating the same values sends nothing. A value outside 0..1, a duration outside 1..=3600000 ms, a label over 64 bytes or an invalid color fails with nil, err; to without duration_ms, or the reverse, raises an error.
Parameters
targetPlayer|ElementspecProgressSpec
Returns ok boolean|nil, err string|nil
dlmp.hide_progress
Parameters
Returns ok boolean|nil, err string|nil
dlmp.add_notification
Adds a short notification at the side of the screen. Up to four are shown at once; a new one pushes out the oldest. The client hides each after duration_ms (5000 by default). An empty text, a text over 96 bytes, a duration outside 1..=30000 ms or an invalid color fails with nil, err. Under load, a new notification may be dropped.
Parameters
targetPlayer|ElementspecNotificationSpec
Returns ok boolean|nil, err string|nil
dlmp.clear_notifications
Parameters
Returns ok boolean|nil, err string|nil
GaugeSpec
Fields
valuenumber— 0..1; a value out of range fails withnil, err.iconUiIcon|nil— Any other name raises a Lua error.labelstring|nil— Up to 31 bytes.colorinteger|nil— 0xRRGGBB; defaults to the theme's line color.
dlmp.set_gauge
Sets one gauge in the block beside the radar, for example hunger, stamina, fuel or capture progress. Slots 1..6 set the order, top first. The client decides where the block is placed. Writing an unchanged gauge sends nothing, so a script may repeat the call.
Parameters
targetPlayer|Element— A player ordlmp.root; the root also applies to players who join later.slotintegerspecGaugeSpec
Returns ok boolean|nil, err string|nil
dlmp.clear_gauge
Parameters
Returns ok boolean|nil, err string|nil
dlmp.set_speedometer
Sets the gamemode's speedometer fields, replacing the previous ones: fuel 0..1 and locked, each drawn only when set. The client computes the speed itself and never sends it to the server; the widget is shown only when the theme enables show_speedometer.
Parameters
Returns ok boolean|nil, err string|nil
dlmp.clear_speedometer
Parameters
Returns ok boolean|nil, err string|nil
DlmpUiTheme
The appearance of the built-in UI. Positions and width are fractions of the screen; font_size is in pixels at 1080p and scales with the screen height; opacity applies to panel backgrounds; colors are 0xRRGGBB.
Fields
show_chatboolean|nilshow_nametagsboolean|nilshow_hudboolean|nilshow_player_listboolean|nilshow_announcementboolean|nilshow_countdownboolean|nilshow_statusboolean|nilshow_kill_feedboolean|nilshow_gaugesboolean|nilshow_speedometerboolean|nil— Off by default.speed_unit"kmh"|"mph"|nil— Defaults to "kmh".labelstring|nil— Name in the corner label, drawn incolor_text; up to 31 bytes, longer raises a Lua error. If both this andlabel_accentare empty, the DarqlineMP wordmark is shown.label_accentstring|nil— Rest of the name, drawn incolor_accent; up to 31 bytes.label_notestring|nil— Text after the name, up to 31 bytes; if empty, the player's nick is shown.style_kill_feed"rail"|"chip"|"board"|nil— Defaults to "rail".style_status"rail"|"chip"|"board"|nil— Defaults to "rail".style_countdown"rail"|"chip"|"board"|nil— Defaults to "chip".font"sans"|"mono"|nilfont_sizeinteger|nil— 10..48chat_rowsinteger|nil— 1..40chat_widthnumber|nil— 0.1..1opacitynumber|nil— 0..1, darkness of bands and panels; below about 0.5, text on a bright frame relies on its shadowglownumber|nil— 0..1, glow strength of the line, 0 for none; a player's own setting can lower it furthercolor_textinteger|nilcolor_nameinteger|nilcolor_timeinteger|nilcolor_lineinteger|nil— start of the linecolor_accentinteger|nil— end of the line, its node and group titlescolor_panelinteger|nilcolor_iconinteger|nil— cause icon in the kill feedcolor_healthinteger|nil— health bar on nametags
dlmp.set_ui_theme
Sets fields of the built-in UI theme on every client, on top of the current values. An unknown field or a wrong type raises a Lua error; a value out of range fails with nil, err. The calling resource holds the theme until it calls dlmp.reset_ui_theme or stops (the default is then restored); calls from other resources fail meanwhile. A hidden widget still receives its data.
Parameters
themeDlmpUiTheme
Returns ok boolean|nil, err string|nil
dlmp.reset_ui_theme
Restores the default theme and releases it; fails while another resource holds the theme.
Returns ok boolean|nil, err string|nil
dlmp.ui_theme
Returns the current built-in UI theme with every field set.
Returns DlmpUiTheme
