Difference between revisions of "Scpui.tbl"
From FreeSpace Wiki
(→+Alt Bitmap:) |
(→#Background Replacement) |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | {{ | + | {{SCPUI_table}} |
{{Tables}} | {{Tables}} | ||
Scpui.tbl is used by the [[SCPUI]] script system to define what [[List_of_Game_States|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. | Scpui.tbl is used by the [[SCPUI]] script system to define what [[List_of_Game_States|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. | ||
| Line 11: | Line 11: | ||
==#Settings== | ==#Settings== | ||
*This section defines a few global SCPUI settings | *This section defines a few global SCPUI settings | ||
| + | |||
| + | ===$Mod ID:=== | ||
| + | *The mod ID to use. By default this will match your mod's path root folder. For example, [[bta|Between the Ashes]] has a -mod line like <code>-mod BTA-2.0.0\content</code> and so the default Mod ID will resolve to <code>BTA</code>. 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_id". | ||
| + | *Syntax: '''''boolean''''' | ||
| + | |||
| + | ===$Default FSO Font Name:=== | ||
| + | *The Font name or index from fonts.tbl that SCPUI should use to get a base pixel value from. By default it will use the font at index 1. | ||
| + | *Syntax: '''''string''''' | ||
===$Hide Multiplayer:=== | ===$Hide Multiplayer:=== | ||
| Line 43: | Line 51: | ||
*This value is optional. If not provided, a default height of 48 will be used. | *This value is optional. If not provided, a default height of 48 will be used. | ||
*Syntax: '''''integer''''' | *Syntax: '''''integer''''' | ||
| + | |||
| + | ===$Database Unread Show String Badge:=== | ||
| + | *If true, then unread database entries will display a text badge (such as "NEW!"). | ||
| + | *This value is optional. If not provided, the default is false. | ||
| + | *Syntax: '''''boolean''''' | ||
| + | |||
| + | ===$Database Unread String Badge Class:=== | ||
| + | *Specifies the RCSS class(es) to apply to the unread string badge element. | ||
| + | *This allows customization of font color, weight, or other text styling. | ||
| + | *This value is optional. If not provided, no class will be applied. | ||
| + | *Syntax: '''''string''''' (RCSS class name or space-separated list of class names) | ||
| + | |||
| + | ===$Database Unread String Badge Text:=== | ||
| + | *Specifies the text displayed in the unread string badge. | ||
| + | *If not provided, the default is the localized "NEW!" string. | ||
| + | *Syntax: '''''string''''' | ||
| + | |||
| + | ===$Database Unread Show Icon Badge:=== | ||
| + | *If true, then unread database entries will display an icon badge (an image). | ||
| + | *This value is optional. If not provided, the default is false. | ||
| + | *Syntax: '''''boolean''''' | ||
| + | |||
| + | ===$Database Unread Icon Badge Class:=== | ||
| + | *Specifies the RCSS class(es) to apply to the unread icon <img> element. | ||
| + | *This allows control of icon sizing, margins, and positioning. | ||
| + | *This value is optional. If not provided, no class will be applied. | ||
| + | *Syntax: '''''string''''' (RCSS class name or space-separated list of class names) | ||
| + | |||
| + | ===$Database Unread Icon Badge Filename:=== | ||
| + | *Specifies the filename of the icon to use for the unread badge. | ||
| + | *The path is relative to the mod’s interface art directory. | ||
| + | *This value is optional. If not provided, no icon is shown. | ||
| + | *Syntax: '''''string''''' (filename, e.g. "new_badge.png") | ||
| + | |||
| + | ===$Database Unread Badge Position:=== | ||
| + | *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". | ||
| + | *This value is optional. If not provided, the default is "left". | ||
| + | *CURRENTLY NOT SUPPORTED AND HARD RESETS TO LEFT | ||
| + | *Syntax: '''''string''''' | ||
| + | |||
| + | ===$Database Unread Item Class:=== | ||
| + | *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). | ||
| + | *This value is optional. If not provided, no additional class is applied. | ||
| + | *Syntax: '''''string''''' (RCSS class name or space-separated list of class names) | ||
| + | |||
| + | ===$Minimum Splash Time:=== | ||
| + | *Specifies the minimum time each splash screen should be shown in seconds during preload. | ||
| + | *This value is optional. If not provided, a default time of 2 will be used. | ||
| + | *Syntax: '''''integer''''' | ||
| + | |||
| + | ===$Fade Splash Images:=== | ||
| + | *Determines if the splash images should fade in and out during preload. | ||
| + | *This value is optional. If not provided, a default value of true is used. | ||
| + | *Syntax: '''''boolean''''' | ||
| + | |||
| + | ===$Draw Splash Images:=== | ||
| + | *Determines if the splash images should be drawn at all during preload. | ||
| + | *This value is optional. If not provided, a default value of true is used. | ||
| + | *Syntax: '''''boolean''''' | ||
| + | |||
| + | ===$Draw Splash Text:=== | ||
| + | *Determines if the splash text should be drawn at all during preload. | ||
| + | *This value is optional. If not provided, a default value of true is used. | ||
| + | *Syntax: '''''boolean''''' | ||
==#State Replacement== | ==#State Replacement== | ||
| Line 62: | Line 136: | ||
==#Background Replacement== | ==#Background Replacement== | ||
| − | *Defines what css class to use to set the background for UIs on a per-campaign basis. | + | *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<code>general_bg</code>. | *By default all UIs use the css class<code>general_bg</code>. | ||
| Line 71: | Line 146: | ||
====+Campaign Filename:==== | ====+Campaign Filename:==== | ||
*The campaign filename without extension | *The campaign filename without extension | ||
| + | *Syntax: '''''string''''' | ||
| + | |||
| + | ====+RCSS Class Name:==== | ||
| + | *The css class name to use as a replacement. Make sure this class exists in a loaded rcss file! | ||
| + | *Syntax: '''''string''''' | ||
| + | |||
| + | ===$Mainhall Background:=== | ||
| + | *Designates that a new define will follow | ||
| + | *Has no arguments | ||
| + | |||
| + | ====+Mainhall Name:==== | ||
| + | *The mainhall name | ||
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
| Line 107: | Line 194: | ||
==#Medal Placements== | ==#Medal Placements== | ||
*This section defines how medals are placed in SCPUI's ui because SCPUI cannot use the definitions in the retail [[medals.tbl|medals.tbl.]] | *This section defines how medals are placed in SCPUI's ui because SCPUI cannot use the definitions in the retail [[medals.tbl|medals.tbl.]] | ||
| − | *SCPUI expects 5 image files for each medal | + | *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 [[Medals.tbl#.24Bitmap:|Bitmap defined in medals.tbl]]. |
| − | ===$Medal | + | ===$Medal:=== |
*The name of the medal as defined in [[Medals.tbl#.24Name:|medals.tbl]]. | *The name of the medal as defined in [[Medals.tbl#.24Name:|medals.tbl]]. | ||
| − | |||
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
Latest revision as of 20:57, 19 September 2025
| This feature requires SCPUI |
| List of Tables and related code files | |
|---|---|
| * Notes Modular Tables | |
| ** Notes tables which only use modular tables | |
| Ai.tbl* | /ai/aicode.cpp |
| Ai_profiles.tbl* | /ai/ai_profiles.cpp |
| Animation.tbl** | /model/modelanimation.cpp |
| Armor.tbl* | /ship/ship.cpp |
| Asteroid.tbl* | /asteroid/asteroid.cpp |
| Autopilot.tbl* | /autopilot/autopilot.cpp |
| Cheats.tbl* | /cheats_table/cheats_table.cpp |
| Colors.tbl* | /globalincs/alphacolors.cpp |
| Curves.tbl* | /math/curves.cpp |
| Controlconfigdefaults.tbl | /controlconfig/controlsconfigcommon.cpp |
| Credits.tbl* | /menuui/credits.cpp |
| Cutscenes.tbl* | /cutscene/cutscenes.cpp |
| Decals.tbl** | /decals/decals.cpp |
| Fireball.tbl* | /fireball/fireballs.cpp |
| Fonts.tbl* | /graphics/font.cpp |
| Game_settings.tbl* | /mod_table/mod_table.cpp |
| Glowpoints.tbl* | /model/modelread.cpp |
| Help.tbl* | /gamehelp/contexthelp.cpp |
| Hud_gauges.tbl* | /hud/hudparse.cpp |
| Icons.tbl* | /mission/missionbriefcommon.cpp |
| Iff_defs.tbl* | /iff_defs/iff_defs.cpp |
| Keywords.tbl* | Not In Codebase |
| Lighting_Profiles.tbl* | /lighting/lighting_profiles.cpp |
| Lightning.tbl* | /nebula/neblightning.cpp |
| Mainhall.tbl* | /menuui/mainhallmenu.cpp |
| Medals.tbl* | /stats/medals.cpp |
| Messages.tbl* | /mission/missionmessage.cpp |
| Mflash.tbl* | /weapon/muzzleflash.cpp |
| Music.tbl* | /gamesnd/eventmusic.cpp |
| Nebula.tbl* | /nebula/neb.cpp |
| Objecttypes.tbl* | /ship/ship.cpp |
| Options.tbl* | Not In Codebase |
| Particle effects(-part.tbm)** | /particle/effects... |
| Post_processing.tbl | /graphics/gropenglpostprocessing.cpp |
| Rank.tbl* | /stats/scoring.cpp |
| Scpui.tbl* | Not In Codebase |
| Scripting.tbl* | /parse/scripting.cpp |
| Ships.tbl* | /ship/ship.cpp |
| Sexps.tbl** | /parse/sexp/sexp_lookup.cpp |
| Sounds.tbl* | /gamesnd/gamesnd.cpp |
| Species_defs.tbl* | /species_defs/species_defs.cpp |
| Species.tbl* | /menuui/techmenu.cpp |
| Ssm.tbl* | /hud/hudartillery.cpp |
| Stars.tbl* | /starfield/starfield.cpp |
| Strings.tbl* | /localization/localize.cpp |
| Tips.tbl* | /menuui/playermenu.cpp |
| Traitor.tbl* | /stats/scoring.cpp |
| Tstrings.tbl* | /localization/localize.cpp |
| Virtual_pofs.tbl* | /model/modelreplace.cpp |
| Weapon_expl.tbl* | /weapon/weapons.cpp |
| Weapons.tbl* | /weapon/weapons.cpp |
Scpui.tbl is used by the SCPUI script system 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.
SCPUI.tbl can be extended with xxx-ui.tbm.
Contents
- 1 SCPUI.tbl
- 2 #Settings
- 2.1 $Mod ID:
- 2.2 $Default FSO Font Name:
- 2.3 $Hide Multiplayer:
- 2.4 $Disable during Multiplayer:
- 2.5 $Data Saver Multiplier:
- 2.6 $Ship Icon Width:
- 2.7 $Ship Icon Height:
- 2.8 $Weapon Icon Width:
- 2.9 $Weapon Icon Height:
- 2.10 $Database Unread Show String Badge:
- 2.11 $Database Unread String Badge Class:
- 2.12 $Database Unread String Badge Text:
- 2.13 $Database Unread Show Icon Badge:
- 2.14 $Database Unread Icon Badge Class:
- 2.15 $Database Unread Icon Badge Filename:
- 2.16 $Database Unread Badge Position:
- 2.17 $Database Unread Item Class:
- 2.18 $Minimum Splash Time:
- 2.19 $Fade Splash Images:
- 2.20 $Draw Splash Images:
- 2.21 $Draw Splash Text:
- 3 #State Replacement
- 4 #Background Replacement
- 5 #Briefing Stage Background Replacement
- 6 #Medal Placements
SCPUI.tbl
- SCPUI defines what game states and substates exist for SCPUI through the use of this table file and modular -ui.tbms.
- Begins with one of the section names and ends with #End
#Settings
- This section defines a few global SCPUI settings
$Mod ID:
- 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_id". - Syntax: boolean
$Default FSO Font Name:
- The Font name or index from fonts.tbl that SCPUI should use to get a base pixel value from. By default it will use the font at index 1.
- Syntax: string
$Hide Multiplayer:
- Hides all references and navigation to multiplayer UI screens and options. Useful if your mod does not support Multi.
- Syntax: boolean
$Disable during Multiplayer:
- Entirely disables SCPUI when in multiplayer mode.
- Syntax: boolean
$Data Saver Multiplier:
- 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
$Ship Icon Width:
- Specifies the width of the icon used for ships in the SCPUI system.
- This value is optional. If not provided, a default width of 128 will be used.
- Syntax: integer
$Ship Icon Height:
- Specifies the height of the icon used for ships in the SCPUI system.
- This value is optional. If not provided, a default height of 112 will be used.
- Syntax: integer
$Weapon Icon Width:
- Specifies the width of the icon used for weapons in the SCPUI system.
- This value is optional. If not provided, a default width of 112 will be used.
- Syntax: integer
$Weapon Icon Height:
- Specifies the height of the icon used for weapons in the SCPUI system.
- This value is optional. If not provided, a default height of 48 will be used.
- Syntax: integer
$Database Unread Show String Badge:
- If true, then unread database entries will display a text badge (such as "NEW!").
- This value is optional. If not provided, the default is false.
- Syntax: boolean
$Database Unread String Badge Class:
- Specifies the RCSS class(es) to apply to the unread string badge element.
- This allows customization of font color, weight, or other text styling.
- This value is optional. If not provided, no class will be applied.
- Syntax: string (RCSS class name or space-separated list of class names)
$Database Unread String Badge Text:
- Specifies the text displayed in the unread string badge.
- If not provided, the default is the localized "NEW!" string.
- Syntax: string
$Database Unread Show Icon Badge:
- If true, then unread database entries will display an icon badge (an image).
- This value is optional. If not provided, the default is false.
- Syntax: boolean
$Database Unread Icon Badge Class:
- Specifies the RCSS class(es) to apply to the unread icon <img> element.
- This allows control of icon sizing, margins, and positioning.
- This value is optional. If not provided, no class will be applied.
- Syntax: string (RCSS class name or space-separated list of class names)
$Database Unread Icon Badge Filename:
- Specifies the filename of the icon to use for the unread badge.
- The path is relative to the mod’s interface art directory.
- This value is optional. If not provided, no icon is shown.
- Syntax: string (filename, e.g. "new_badge.png")
$Database Unread Badge Position:
- 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".
- This value is optional. If not provided, the default is "left".
- CURRENTLY NOT SUPPORTED AND HARD RESETS TO LEFT
- Syntax: string
$Database Unread Item Class:
- 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).
- This value is optional. If not provided, no additional class is applied.
- Syntax: string (RCSS class name or space-separated list of class names)
$Minimum Splash Time:
- Specifies the minimum time each splash screen should be shown in seconds during preload.
- This value is optional. If not provided, a default time of 2 will be used.
- Syntax: integer
$Fade Splash Images:
- Determines if the splash images should fade in and out during preload.
- This value is optional. If not provided, a default value of true is used.
- Syntax: boolean
$Draw Splash Images:
- Determines if the splash images should be drawn at all during preload.
- This value is optional. If not provided, a default value of true is used.
- Syntax: boolean
$Draw Splash Text:
- Determines if the splash text should be drawn at all during preload.
- This value is optional. If not provided, a default value of true is used.
- Syntax: boolean
#State Replacement
- This section defines what RML files are used to replace specific game states.
$State:
- The game state to replace from FSO's game states
- Syntax: string
+Substate:
- The name of the substate
- Required for GS_STATE_SCRIPTING
- Syntax: string
+Markup:
- The path to the RML file definition to use for the game state
- Must include the file path
- Syntax: string
#Background Replacement
- 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.
$Campaign Background:
- Designates that a new define will follow
- Has no arguments
+Campaign Filename:
- The campaign filename without extension
- Syntax: string
+RCSS Class Name:
- The css class name to use as a replacement. Make sure this class exists in a loaded rcss file!
- Syntax: string
$Mainhall Background:
- Designates that a new define will follow
- Has no arguments
+Mainhall Name:
- The mainhall name
- Syntax: string
+RCSS Class Name:
- The css class name to use as a replacement. Make sure this class exists in a loaded rcss file!
- Syntax: string
#Briefing Stage Background Replacement
- Defines customized briefing grid backgrounds on a per-mission or per-briefing-stage level.
- The background is
br-black.pngby default.
$Briefing Grid Background:
- Designates that a new define will follow
- Has no arguments
+Mission Filename:
- The mission filename where the briefing background will be replaced
- Without extension
- Syntax: string
+Default Background Filename:
- The new default background file to use for the mission
- WITH extension
- Syntax: string
+Stage Override:
- 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
+Background Filename:
- The new default background file to use for the stage
- WITH extension
- Syntax: string
#Medal Placements
- 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.
$Medal:
- The name of the medal as defined in medals.tbl.
- Syntax: string
+Alt Bitmap:
- 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
+Alt Debrief Bitmap:
- 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
+Position X:
- The X coordinate for the medal
- Syntax: float
+Position Y:
- The Y coordinate for the medal
- Syntax: float
+Width:
- The width of the medal
- Syntax: float
FS1 Medal Numbering Chart
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 |
Example
#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 #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 #End