Difference between revisions of "Keywords.tbl"
(Created page with "{{SCP_table}} {{Tables}} Keywords.tbl is used by the SCPUI script system to define words that should be colored or have tooltips. This allows coloring important words thro...") |
|||
Line 1: | Line 1: | ||
{{SCP_table}} | {{SCP_table}} | ||
{{Tables}} | {{Tables}} | ||
− | Keywords.tbl is | + | Keywords.tbl is [[SCPUI]]'s extension of the [[Briefing Text|color tag]] system. It allows styling important words throughout the briefing UIs without having to use inline color tags (although they are supported, under a different syntax, for one-off words). Keywords can also be given tooltips. |
− | '''This feature only works in Briefing, Command Briefing, Debriefing, Fiction Viewer, Loop Briefing, and Red Alert.''' | + | Keyword matching uses a system of prefixes and suffixes to provide flexibility. When a keyword is matched, if it follows one of its prefixes, is followed by one of its suffixes, or both, the prefix and/or suffix is treated as part of the keyword. Prefixes and suffixes can be ''separate'', meaning they're their own word (or words), or ''separate'', meaning that they're part of the word they attach to. An example of the former would be ship prefixes like GTD or SC. An example of the latter would be the English possessive marker "'s". |
+ | |||
+ | Prefixes and suffixes are usually defined per keyword, but may be defined globally as well. | ||
+ | |||
+ | '''This feature only works in Briefing, Command Briefing, Debriefing, Fiction Viewer, Loop Briefing, and Red Alert, and only in HTML mode.''' | ||
Keywords.tbl can be extended with xxx-kwrd.tbm. | Keywords.tbl can be extended with xxx-kwrd.tbm. | ||
Line 9: | Line 13: | ||
==Keywords.tbl== | ==Keywords.tbl== | ||
*Defines colors and tooltips for the briefing UIs throughout the SCPUI interface system. | *Defines colors and tooltips for the briefing UIs throughout the SCPUI interface system. | ||
− | *Begins with #Default and ends with #End | + | *Begins with #Default and ends with #End. |
− | *Translation support will be added | + | *Translation support will be added soon™. |
==#Default== | ==#Default== | ||
Line 16: | Line 20: | ||
===+Prefix:=== | ===+Prefix:=== | ||
− | * | + | *Define a globally-available separated prefix (see above). |
− | *Can be listed multiple times | + | *Can be listed multiple times. |
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
===+Immediate Prefix:=== | ===+Immediate Prefix:=== | ||
− | * | + | *Define a globally-available immediate prefix (see above). |
*Can be listed multiple times | *Can be listed multiple times | ||
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
===+Suffix:=== | ===+Suffix:=== | ||
− | * | + | *Define a globally-available separated suffix (see above). |
*Can be listed multiple times | *Can be listed multiple times | ||
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
===+Immediate Suffix:=== | ===+Immediate Suffix:=== | ||
− | * | + | *Define a globally-available immediate suffix (see above). |
*Can be listed multiple times | *Can be listed multiple times | ||
− | * | + | *In English, this is typically used for plurals (s, es) and possessives ('s). |
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
− | === | + | ===$Style=== |
− | * | + | *Begin defining a keyword, and define the CSS class(es) associated with it. |
− | *The string here | + | *The string here should be a CSS class from common.rcss, or multiple such classes separated with spaces. |
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
====+Prefix:==== | ====+Prefix:==== | ||
− | * | + | *Define a separated prefix for this keyword (see above). |
− | *Can be listed multiple times | + | *Can be listed multiple times. |
− | *An example would be GTD for a list of destroyers | + | *An example would be GTD for a keyword representing a list of destroyers. |
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
====+Immediate Prefix:==== | ====+Immediate Prefix:==== | ||
− | * | + | *Define an immediate prefix for this keyword (see above). |
− | *Can be listed multiple times | + | *Can be listed multiple times. |
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
====+Suffix:==== | ====+Suffix:==== | ||
− | * | + | *Define a separated suffix for this keyword (see above). |
− | *Can be listed multiple times | + | *Can be listed multiple times. |
+ | *Common examples include listing Roman numerals for planets orbiting a star, or digits after a wing name. | ||
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
====+Immediate Suffix:==== | ====+Immediate Suffix:==== | ||
− | * | + | *Define an immediate suffix for this keyword (see above). |
− | *Can be listed multiple times | + | *Can be listed multiple times. |
− | |||
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
====+Text:==== | ====+Text:==== | ||
− | *The actual | + | *The actual keyword to apply this style to. |
− | + | *Can be listed multiple times. | |
− | *Can be listed multiple times | + | *There's no actual requirement that this be a single word - e.g. "Beta Aquilae" is perfectly valid. |
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
=====++Tooltip:===== | =====++Tooltip:===== | ||
*A tooltip to add to this specific keyword. Will show up if the mouse is hovered over the keyword. | *A tooltip to add to this specific keyword. Will show up if the mouse is hovered over the keyword. | ||
+ | *This applies ''only'' to the previous +Text: entry. | ||
*Syntax: '''''string''''' | *Syntax: '''''string''''' | ||
Line 80: | Line 85: | ||
+Immediate Suffix: 's | +Immediate Suffix: 's | ||
+ | ; Friendly wings, and specific ships within those wings, are blue. | ||
$Style: blue | $Style: blue | ||
+Suffix: 1 | +Suffix: 1 | ||
Line 88: | Line 94: | ||
+Text: Beta | +Text: Beta | ||
+Text: Gamma | +Text: Gamma | ||
− | + | ; Delta, Epsilon, etc. omitted for brevity | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ; Stars and planets are yellow. | ||
$Style: yellow | $Style: yellow | ||
+Suffix: I | +Suffix: I | ||
Line 142: | Line 106: | ||
+Suffix: VII | +Suffix: VII | ||
+Suffix: VIII | +Suffix: VIII | ||
− | |||
− | |||
− | |||
− | |||
− | |||
+Text: Antares | +Text: Antares | ||
− | |||
+Text: Beta Aquilae | +Text: Beta Aquilae | ||
− | |||
− | |||
− | |||
+Text: Delta Serpentis | +Text: Delta Serpentis | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | $Style: | + | $Style: blue |
− | +Text: | + | +Text: RIO |
− | +Text: | + | ++Tooltip: Radar Intercept Officer |
+ | +Text: SAR | ||
+ | ++Tooltip: Search and Rescue | ||
+ | +Text: OrBat | ||
+ | ++Tooltip: Order of Battle | ||
$Style: blue | $Style: blue | ||
− | + | + | +Suffix: s |
− | |||
− | |||
− | |||
+Text: Terran | +Text: Terran | ||
− | +Text: | + | +Text: Vasudan |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
$Style: green italic | $Style: green italic | ||
Line 306: | Line 140: | ||
+Text: Uhuru | +Text: Uhuru | ||
+Text: Vienna | +Text: Vienna | ||
− | + | ; "Intrepid", "Intrepid's", "GTD Intrepid", and "GTD Intrepid's" will all be green and italicized. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
#end | #end |
Revision as of 21:38, 27 August 2024
This feature requires FreeSpace Open |
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 |
Keywords.tbl is SCPUI's extension of the color tag system. It allows styling important words throughout the briefing UIs without having to use inline color tags (although they are supported, under a different syntax, for one-off words). Keywords can also be given tooltips.
Keyword matching uses a system of prefixes and suffixes to provide flexibility. When a keyword is matched, if it follows one of its prefixes, is followed by one of its suffixes, or both, the prefix and/or suffix is treated as part of the keyword. Prefixes and suffixes can be separate, meaning they're their own word (or words), or separate, meaning that they're part of the word they attach to. An example of the former would be ship prefixes like GTD or SC. An example of the latter would be the English possessive marker "'s".
Prefixes and suffixes are usually defined per keyword, but may be defined globally as well.
This feature only works in Briefing, Command Briefing, Debriefing, Fiction Viewer, Loop Briefing, and Red Alert, and only in HTML mode.
Keywords.tbl can be extended with xxx-kwrd.tbm.
Contents
Keywords.tbl
- Defines colors and tooltips for the briefing UIs throughout the SCPUI interface system.
- Begins with #Default and ends with #End.
- Translation support will be added soon™.
#Default
- This section defines the basic keyword colors and tooltips.
+Prefix:
- Define a globally-available separated prefix (see above).
- Can be listed multiple times.
- Syntax: string
+Immediate Prefix:
- Define a globally-available immediate prefix (see above).
- Can be listed multiple times
- Syntax: string
+Suffix:
- Define a globally-available separated suffix (see above).
- Can be listed multiple times
- Syntax: string
+Immediate Suffix:
- Define a globally-available immediate suffix (see above).
- Can be listed multiple times
- In English, this is typically used for plurals (s, es) and possessives ('s).
- Syntax: string
$Style
- Begin defining a keyword, and define the CSS class(es) associated with it.
- The string here should be a CSS class from common.rcss, or multiple such classes separated with spaces.
- Syntax: string
+Prefix:
- Define a separated prefix for this keyword (see above).
- Can be listed multiple times.
- An example would be GTD for a keyword representing a list of destroyers.
- Syntax: string
+Immediate Prefix:
- Define an immediate prefix for this keyword (see above).
- Can be listed multiple times.
- Syntax: string
+Suffix:
- Define a separated suffix for this keyword (see above).
- Can be listed multiple times.
- Common examples include listing Roman numerals for planets orbiting a star, or digits after a wing name.
- Syntax: string
+Immediate Suffix:
- Define an immediate suffix for this keyword (see above).
- Can be listed multiple times.
- Syntax: string
+Text:
- The actual keyword to apply this style to.
- Can be listed multiple times.
- There's no actual requirement that this be a single word - e.g. "Beta Aquilae" is perfectly valid.
- Syntax: string
++Tooltip:
- A tooltip to add to this specific keyword. Will show up if the mouse is hovered over the keyword.
- This applies only to the previous +Text: entry.
- Syntax: string
Example
#Default +Immediate Suffix: ' +Immediate Suffix: 's ; Friendly wings, and specific ships within those wings, are blue. $Style: blue +Suffix: 1 +Suffix: 2 +Suffix: 3 +Suffix: 4 +Text: Alpha +Text: Beta +Text: Gamma ; Delta, Epsilon, etc. omitted for brevity ; Stars and planets are yellow. $Style: yellow +Suffix: I +Suffix: II +Suffix: III +Suffix: IV +Suffix: V +Suffix: VI +Suffix: VII +Suffix: VIII +Text: Antares +Text: Beta Aquilae +Text: Delta Serpentis $Style: blue +Text: RIO ++Tooltip: Radar Intercept Officer +Text: SAR ++Tooltip: Search and Rescue +Text: OrBat ++Tooltip: Order of Battle $Style: blue +Suffix: s +Text: Terran +Text: Vasudan $Style: green italic +Prefix: GTD +Text: Amadeus +Text: Bastion +Text: Delacroix +Text: Eisenhower +Text: Galatea +Text: Goliath +Text: Intrepid +Text: Krios +Text: Legion +Text: Malendroke +Text: Minnow +Text: Nereid +Text: Soyakaze +Text: Uhuru +Text: Vienna ; "Intrepid", "Intrepid's", "GTD Intrepid", and "GTD Intrepid's" will all be green and italicized. #end