Difference between revisions of "Keywords.tbl"

From FreeSpace Wiki
Jump to: navigation, search
(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 used by the [[SCPUI]] script system to define words that should be colored or have tooltips. This allows coloring important words throughout the briefing UIs without having to use inline color definitions.
+
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 soon (tm).
+
*Translation support will be added soon™.
  
 
==#Default==
 
==#Default==
Line 16: Line 20:
  
 
===+Prefix:===
 
===+Prefix:===
*A global Prefix to add to all keywords. A Prefix must have a space between the prefix and the keyword to be valid.
+
*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:===
*A global Immediate Prefix to add to all keywords. Does not need to have a space between the prefix and the keyword.
+
*Define a globally-available immediate prefix (see above).
 
*Can be listed multiple times
 
*Can be listed multiple times
 
*Syntax: '''''string'''''
 
*Syntax: '''''string'''''
  
 
===+Suffix:===
 
===+Suffix:===
*A global Suffix to add to all keywords. A Suffix must have a space between the suffix and the keyword to be valid.
+
*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:===
*A global Immediate Suffix to add to all keywords. Does not need to have a space between the suffix and the keyword.
+
*Define a globally-available immediate suffix (see above).
 
*Can be listed multiple times
 
*Can be listed multiple times
*An example would be `s to handle pluralizing your keywords.
+
*In English, this is typically used for plurals (s, es) and possessives ('s).
 
*Syntax: '''''string'''''
 
*Syntax: '''''string'''''
  
===#Style===
+
===$Style===
*Begins a style definition for keywords
+
*Begin defining a keyword, and define the CSS class(es) associated with it.
*The string here refers to a valid CSS class that should be defined in common.rcss
+
*The string here should be a CSS class from common.rcss, or multiple such classes separated with spaces.
 
*Syntax: '''''string'''''
 
*Syntax: '''''string'''''
  
 
====+Prefix:====
 
====+Prefix:====
*A Prefix to add to all keywords. A Prefix must have a space between the prefix and the keyword to be valid.
+
*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:====
*A Immediate Prefix to add to all keywords. Does not need to have a space between the prefix and the keyword.
+
*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:====
*A Suffix to add to all keywords. A Suffix must have a space between the suffix and the keyword to be valid.
+
*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:====
*A Immediate Suffix to add to all keywords. Does not need to have a space between the suffix and the keyword.
+
*Define an immediate suffix for this keyword (see above).
*Can be listed multiple times
+
*Can be listed multiple times.
*An example would be `s to handle pluralizing your keywords.
 
 
*Syntax: '''''string'''''
 
*Syntax: '''''string'''''
  
 
====+Text:====
 
====+Text:====
*The actual keywords to apply this style to
+
*The actual keyword to apply this style to.
*Matching keywords will be the specific keyword and any version of prefix, keyword, suffix concatenations
+
*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
+Text: Delta
+
; Delta, Epsilon, etc. omitted for brevity
+Text: Epsilon
 
+Text: Zeta
 
+Text: Eta
 
+Text: Iota
 
+Text: Chi
 
+Text: Phi
 
+Text: Psi
 
+Text: Pi
 
+Text: Upsilon
 
+Text: Xi
 
+Text: Lambda
 
+Text: Omega
 
+Text: Rho
 
+Text: Sigma
 
+Text: Tau
 
+Text: Kappa
 
+Text: Omicron
 
 
 
$Style: blue
 
+Text: Ancient
 
+Text: Ancients
 
+Text: convergence engine
 
+Text: convergence engines
 
 
 
$Style: white
 
+Text: OPHOSIS
 
+Text: Lascaux
 
 
 
$Style: blue
 
+Text: RIO
 
+Text: SAR
 
+Text: OrBat
 
+Text: Order of Battle
 
 
 
$Style: yellow
 
+Text: Iraklion
 
+Text: Iraklion Corridor
 
+Text: Oort Cloud
 
+Text: Doceitov Cloud
 
+Text: Gulnara
 
+Text: Thanut
 
+Text: Earth
 
+Text: Vasuda Prime
 
  
 +
; 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: Adhara
 
+Text: Aldebaran
 
+Text: Alpha Centauri
 
+Text: Alphard
 
+Text: Altair
 
 
+Text: Antares
 
+Text: Antares
+Text: Barnard's Star
 
 
+Text: Beta Aquilae
 
+Text: Beta Aquilae
+Text: Beta Cygni
 
+Text: Betelgeuse
 
+Text: Capella
 
 
+Text: Delta Serpentis
 
+Text: Delta Serpentis
+Text: Deneb
 
+Text: Dubhe
 
+Text: Epsilon Pegasi
 
+Text: Gamma Draconis
 
+Text: Ikeya
 
+Text: Laramis
 
+Text: Luyten
 
+Text: Luyten 726-BA
 
+Text: Mirfak
 
+Text: N368
 
+Text: Polaris
 
+Text: Procyon
 
+Text: Procyon A
 
+Text: Regulus
 
+Text: Ribos
 
+Text: Ross 128
 
+Text: Sirius
 
+Text: Sol
 
+Text: Vasuda
 
+Text: Vega
 
+Text: Wolf 359
 
  
$Style: red
+
$Style: blue
+Text: Lucerta
+
+Text: RIO
+Text: Lucerta plague
+
++Tooltip: Radar Intercept Officer
 +
+Text: SAR
 +
++Tooltip: Search and Rescue
 +
+Text: OrBat
 +
++Tooltip: Order of Battle
  
 
$Style: blue
 
$Style: blue
+Text: GTA
+
+Suffix: s
+Text: Galactic Terran Alliance
 
+Text: Alliance
 
+Text: Allied
 
 
+Text: Terran
 
+Text: Terran
+Text: Terrans
+
+Text: Vasudan
+Text: GTA Command
 
+Text: Terran Command
 
+Text: Joint Chiefs of Staff
 
+Text: JCOS
 
+Text: JAG
 
+Text: GTVA
 
+Text: Galactic Terran-Vasudan Alliance
 
 
 
$Style: blue
 
+Text: 47th
 
+Text: Cutthroats
 
+Text: 107th
 
+Text: 132nd
 
+Text: 390th
 
+Text: 391th
 
+Text: 413th
 
+Text: Alchemists
 
+Text: 508th
 
+Text: Loaded Dice
 
+Text: 604th
 
+Text: Cutthroat
 
+Text: Cutthroats
 
 
 
$Style: blue
 
+Prefix: Admiral
 
+Text: Po
 
+Text: Shirazi
 
+Text: McPherson
 
+Text: Namgung
 
+Text: Halkins
 
 
 
$Style: blue
 
+Prefix: Vice Admiral
 
+Text: Tighe
 
 
 
$Style: blue
 
+Prefix: Captain
 
+Text: Varner
 
+Text: Jan Varner
 
+Text: Rostami
 
+Text: Petrillo
 
 
 
$Style: blue
 
+Prefix: Corporal
 
+Text: Barzetti
 
 
 
$Style: blue
 
+Prefix: Acting
 
+Text: Captain Kanun Jers
 
+Text: Captain Jers
 
 
 
$Style: blue
 
+Prefix: Commander
 
+Text: Jers
 
+Text: Kanun Jers
 
+Text: Rai
 
+Text: Riohs
 
+Text: Vestri
 
 
 
$Style: blue
 
+Prefix: Lieutenant Commander
 
+Prefix: Subcommander
 
+Text: Petoph
 
 
 
$Style: blue
 
+Prefix: Lieutenant
 
+Text: Alex McPherson
 
+Text: Maria
 
+Text: McGivers
 
+Text: McPherson
 
+Text: Weyman
 
 
 
$Style: blue
 
+Prefix: Ensign
 
+Text: Assis
 
+Text: Kumagai
 
+Text: Navarre
 
+Text: Ramil
 
+Text: Weyman
 
+Text: Toury
 
 
 
$Style: blue
 
+Text: Skunk
 
+Text: Charon
 
+Text: Maverick
 
+Text: Pholos
 
+Text: Rosemary
 
+Text: Martellato
 
+Text: Azure
 
; Hermes omitted intentionally
 
+Text: Shuggoth
 
+Text: Pennywise
 
+Text: Greenbark
 
+Text: Greenbark 2
 
 
 
$Style: blue
 
+Text: STX
 
+Text: STX Exploration
 
 
 
$Style: blue
 
+Text: Whiteside Construction
 
  
 
$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.
$Style: green italic
 
+Prefix: GTC
 
+Text: Eudora
 
+Text: Harewood
 
+Text: Marion
 
+Text: Neptune
 
+Text: Oberon
 
+Text: Rewick
 
+Text: Bunker Hill
 
 
 
$Style: green italic
 
+Prefix: GTFr
 
+Text: Baloris
 
+Text: Jakarta
 
+Text: Novak
 
+Text: Reno
 
+Text: Tangier
 
+Text: Okayama
 
+Text: Brimspark
 
+Text: Quartzon
 
 
 
$Style: green italic
 
+Text: Gregor
 
+Text: GTM Gregor
 
+Text: Hearst
 
+Text: GTG Hearst
 
+Text: Wayfarer
 
+Text: Wayfarer Station
 
+Text: GTI Wayfarer
 
+Text: GTI Wayfarer Station
 
+Text: Patmos
 
+Text: Patmos Station
 
+Text: Novograd
 
+Text: Novograd Station
 
+Text: Masada
 
+Text: Masada Control
 
+Text: Masada Redoubt
 
+Text: Tombaugh
 
+Text: Tombaugh Station
 
+Text: Karnachi
 
+Text: Karnachi Station
 
+Text: Centaur Station
 
 
 
$Style: green italic
 
+Prefix: GTT
 
+Text: Bridgeport
 
  
 
#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.

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