Repository navigation
scpui.tbl
The scpui.tbl is used by SCPUI to define what engine game states are linked to librocket RML files. This effectively allows SCPUI to override a built-in game UI with one of its own. This table also allows setting various background definitions for UIs on a granular basis.
This table is one of the Modular Tables and can be extended with xxx-ui.tbm.
Code: /content/data/scripts/scpui_sm_parser.lua; #Medal Placements is read by /content/data/scripts/ctrlr_medals.lua. See Tables for every table.
Badges show the SCPUI version a field or behavior was added in. Fields without a badge are from SCPUI 0.5.0 or earlier.
- Format
- #Settings
- #State Replacement
- #Background Replacement
- #Briefing Stage Background Replacement
- #Loading Text
- #Loading Screens
- #Mission Screens
- #Medal Placements
- Sample
Field index (every field, one per line in table order; click one to jump to it)
- $Mod ID:
- $Default FSO Font Name:
- $Hide Multiplayer:
- $Disable during Multiplayer:
- $Data Saver Multiplier:
- $Ship Icon Width:
- $Ship Icon Height:
- $Weapon Icon Width:
- $Weapon Icon Height:
- $Use Legacy Slider For Volume:
- $Database Unread Show String Badge:
- $Database Unread String Badge Class:
- $Database Unread String Badge Text:
- $Database Unread Show Icon Badge:
- $Database Unread Icon Badge Class:
- $Database Unread Icon Badge Filename:
- $Database Unread Badge Position:
- $Database Unread Item Class:
- $Minimum Splash Time:
- $Fade Splash Images:
- $Draw Splash Images:
- $Draw Splash Text:
- $Always Allow Show All:
- SCPUI defines what game states and substates exist for SCPUI through the use of this table file and modular -ui.tbms.
- Every section is optional, but the sections that are present must appear in the order they are listed on this page. The parser reads them in a fixed sequence, so a section placed out of order is not recognised.
- Fields within a section must also appear in the order listed here.
- Must end with #End. This applies to every -ui.tbm as well, since each one is parsed as a complete table.
- This section defines a few global SCPUI settings
- The mod ID to use. By default this will match your mod's path root folder. For example, Between the Ashes has a -mod line like
-mod BTA-2.0.0\contentand so the default Mod ID will resolve toBTA. If your game runs without a -mod command line then it would be a good idea to set an ID here to prevent it from being "unknown_mod". - Any character that is not a letter, number or underscore is replaced with
_. - Syntax: String
- The Font name or index from fonts.tbl that SCPUI should use to get a base pixel value from.
- If no font with that name or index exists, SCPUI shows a warning and keeps the default font.
- Syntax: String
- Default: the font at index 1
- Hides all references and navigation to multiplayer UI screens and options. Useful if your mod does not support Multi.
- Syntax: Boolean
- Entirely disables SCPUI when in multiplayer mode.
- Syntax: Boolean
- A numeric multiplier used to generate SCPUI's save data hash. Generally this is not needed but can be useful if there are conflicts between mods.
- Syntax: Integer
- Optional. Specifies the width of the icon used for ships in the SCPUI system.
- Syntax: Integer
- Default: 128
- Optional. Specifies the height of the icon used for ships in the SCPUI system.
- Syntax: Integer
- Default: 112
- Optional. Specifies the width of the icon used for weapons in the SCPUI system.
- Syntax: Integer
- Default: 112
- Optional. Specifies the height of the icon used for weapons in the SCPUI system.
- Syntax: Integer
- Default: 48
- Optional. Forces SCPUI to use the retail style 10-dot slider for volume controls instead of the more modern range slider controls.
- Syntax: Boolean
- Default: false
- Optional. If true, then unread database entries will display a text badge (such as "NEW!").
- Syntax: Boolean
- Default: true
- Optional. Specifies the RCSS class(es) to apply to the unread string badge element.
- This allows customization of font color, weight, or other text styling.
- Only letters, numbers,
_and-are kept; any other character separates class names, and duplicate class names are removed. - Syntax: String (RCSS class name or space-separated list of class names)
- Default: no class is applied
- Specifies the text displayed in the unread string badge.
- Syntax: String
- Default: the localized "NEW!" string
- Optional. If true, then unread database entries will display an icon badge (an image).
- Syntax: Boolean
- Default: false
- Optional. Specifies the RCSS class(es) to apply to the unread icon
<img>element. - This allows control of icon sizing, margins, and positioning.
- Only letters, numbers,
_and-are kept; any other character separates class names, and duplicate class names are removed. - Syntax: String (RCSS class name or space-separated list of class names)
- Default: no class is applied
- Optional. Specifies the filename of the icon to use for the unread badge.
- The path is relative to the mod’s interface art directory.
- Syntax: String (filename, e.g. "new_badge.png")
- Default: no icon is shown
- Optional. Controls whether the unread badge (text and/or icon) is displayed before or after the entry title.
- Valid values are "left" or "right". Any invalid value will default to "left".
- CURRENTLY NOT SUPPORTED AND HARD RESETS TO LEFT
- Syntax: String
- Default: left
- Optional. Specifies the RCSS class(es) to apply to the entire title text when the entry is unread.
- This allows you to change the appearance of the entry header (e.g. brighter text, bold, highlight).
- Only letters, numbers,
_and-are kept; any other character separates class names, and duplicate class names are removed. - Syntax: String (RCSS class name or space-separated list of class names)
- Default: no additional class is applied
- Optional. Specifies the minimum time each splash screen should be shown in seconds during preload.
- Syntax: Integer
- Default: 2
- Optional. Determines if the splash images should fade in and out during preload.
- Syntax: Boolean
- Default: true
- Optional. Determines if the splash images should be drawn at all during preload.
- Syntax: Boolean
- Default: true
- Optional. Determines if the splash text should be drawn at all during preload.
- Syntax: Boolean
- Default: true
- Optional. Allows the Ctrl-Shift-S "show all" feature used in the tech room and other UIs to be used in release builds.
- Syntax: Boolean
- Default: false
- This section defines what RML files are used to replace specific game states.
- The game state to replace from FSO's game states
- Syntax: String
- The name of the substate
- Required for GS_STATE_SCRIPTING and GS_STATE_SCRIPTING_MISSION, and only read for those two states
- GS_STATE_SCRIPTING_MISSION (SCPUI 1.1.0 and later) is for custom UIs that should not end the mission when loaded. Substates defined for it are also added to the
SCPUI_MenusSEXP enum. - Syntax: String
- The path to the RML file definition to use for the game state
- Must include the file path
- Syntax: String
- Defines what css class to use to set the background for UIs on a per-campaign or per-mainhall basis.
- Mainhall defines take priority over Campaign defines.
- By default all UIs use the css class
general_bg. - All
$Campaign Background:entries must come before any$Mainhall Background:entries.
- Designates that a new define will follow
- Has no arguments
- The campaign filename. Any extension is stripped
- Syntax: String
- The css class name to use as a replacement. Make sure this class exists in a loaded rcss file!
- Syntax: String
- SCPUI 1.1.0 to 1.1.2 read this in #Settings instead, with the same fields.
- Designates that a new define will follow
- Has no arguments
- The mainhall name. Everything from the first
.onward is stripped, so the name must not contain a period - Syntax: String
- The css class name to use as a replacement. Make sure this class exists in a loaded rcss file!
- Syntax: String
- Defines customized briefing grid backgrounds on a per-mission or per-briefing-stage level.
- The background is
br-black.pngby default.
- Designates that a new define will follow
- Has no arguments
- The mission filename where the briefing background will be replaced
- Any extension is stripped
- Syntax: String
- The new default background file to use for the mission
- WITH extension. SCPUI shows a warning if the extension is missing
- Syntax: String
- The briefing stage of the mission to define an override for
- Not required for every stage. Any stage without an override will use the mission default
- Syntax: Integer
- The new background file to use for the stage
- WITH extension. SCPUI shows a warning if the extension is missing
- Syntax: String
- Defines named tip strings that loading screen profiles can display. Reference them from #Loading Screens with
$Tip:. - The tip is drawn in the
div#loadscreen_tipelement. All styling is done in RCSS.
- The name of the tip. Used to reference it from
$Tip: - Syntax: String
- Required. The tip text.
- XSTR is supported
- Syntax: String
- Defines named loading screen profiles. Assign them to missions in #Mission Screens.
- The table only carries data. Fonts, colors, positions and sizes are set in RCSS.
- The name of the profile. Used to reference it from
$Loading Screen: - Syntax: String
- Optional. The loading bar animation to use for this profile instead of the default.
- Syntax: String
- Optional. An RCSS class that sets the loading screen background. Make sure this class exists in a loaded rcss file, such as
load_screen_bgs.rcss! - Can be repeated. If more than one is listed, one is picked at random on each load
- Syntax: String
- Optional. The name of a tip from #Loading Text to show on this screen.
- Can be repeated. If more than one is listed, one is picked at random on each load
- SCPUI shows a warning if the tip name does not exist
- Syntax: String
- Assigns a loading screen profile to a mission.
- The mission filename. Any extension is stripped
- Syntax: String
- Required. The name of a profile from #Loading Screens.
- SCPUI shows a warning if the profile name does not exist
- Syntax: String
- This section defines how medals are placed in SCPUI's ui because SCPUI cannot use the definitions in the retail medals.tbl.
- SCPUI expects 5 image files for each medal, a blank indent of the medal (no medal), the medal with no badge, the medal with bronze badge, the medal with silver badge, the medal with gold badge. These should be named MEDALNAME_00, MEDALNAME_01, MEDALNAME_02, MEDALNAME_03, MEDALNAME_04 where MEDALNAME is the Bitmap defined in medals.tbl.
- The name of the medal as defined in medals.tbl.
- Syntax: String
- Allows specifying an alternate SCPUI specific bitmap to use in the medals ui instead of the bitmap tabled for the retail UI
- This is mostly for FSPort since SCPUI carries artwork for all retail medals but sequentially numbers them for FS1 medals. A translation list of medal numbers is below.
- Syntax: String
- Allows specifying an alternate SCPUI specific bitmap to use in the debrief ui instead of the bitmap tabled for the retail UI
- This is mostly for FSPort since SCPUI carries artwork for all retail medals but sequentially numbers them for FS1 medals. A translation list of medal numbers is below.
- Syntax: String
- Required. The X coordinate for the medal, as a percentage of the medals area.
- Syntax: Float
- Required. The Y coordinate for the medal, as a percentage of the medals area.
- Syntax: Float
- Required. The width of the medal, as a percentage of the medals area.
- A medal with no
$Medal:entry is placed at 0, 0 with a width of 10 - Syntax: Float
SCPUI carries artwork for all FS1 and FS2 medals. The bitmaps for FS1 and FS2 in retail are numerically numbered in such a way that they would overlap so SCPUI, technically being a mod of FS2, adds the FS1 medal artwork and sequentially numbers them starting after the last FS2 medal. Here is a quick conversion chart.
| FS1 Original Number | SCPUI Number |
|---|---|
| 00 | 20 |
| 01 | 01 |
| 02 | 02 |
| 03 | 12 |
| 04 | 15 |
| 05 | 17 |
| 06 | 18 |
| 07 | 07 |
| 08 | 14 |
| 09 | 19 |
| 10 | 16 |
| 11 | 13 |
#Settings
$Hide Multiplayer: true
$Database Unread String Badge Class: brightred
#State Replacement
$State: GS_STATE_INITIAL_PLAYER_SELECT
+Markup: data/interface/markup/pilot_select.rml
$State: GS_STATE_SCRIPTING
+Substate: Newsroom
+Markup: data/interface/markup/journal.rml
$State: GS_STATE_SCRIPTING_MISSION
+Substate: MyInMissionMenu
+Markup: data/interface/markup/my_menu.rml
#Background Replacement
$Campaign Background:
+Campaign Filename: bta1_m
+RCSS Class Name: bta1_bg
#Briefing Stage Background Replacement
$Briefing Grid Background:
+Mission Filename: bta2_m1_01
+Default Background Filename: br-black.png
+Stage Override: 1
+Background Filename: br-deltaserpentis.png
+Stage Override: 2
+Background Filename: br-stars.png
+Stage Override: 5
+Background Filename: br-luyten.png
#Loading Text
$Name: bta_tip_01
$Text: XSTR("Remember to match speed with your target.", -1)
#Loading Screens
$Name: bta1_screen
+Background Class: bta1_load_a
+Background Class: bta1_load_b
$Tip: bta_tip_01
#Mission Screens
$Filename: bta1_m1_01.fs2
$Loading Screen: bta1_screen
#Medal Placements
$Medal: Epsilon Pegasi Liberation
+Position X: 10.5
+Position Y: 20
+Width: 12
#End