Achievements .tbl
From FreeSpace Wiki
| 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 |
Achievements.tbl is used by the SCPUI script system to define the achievements available for a particular mod.
Achievements.tbl, by design, is NOT modular and cannot be extended.
Contents
Achievements.tbl
- Defines what achievements are available and how they are unlocked
- Begins with #ACHIEVEMENTS and ends with #End
#ACHIEVEMENTS
- The list of achievements
- Can have multiple Achievements starting with $Name
$Name:
- The name of the achievement as shown to the player.
- Cannot exceed 32 characters.
- Must be unique.
- Syntax: string
+Description:
- A string describing the achievement.
- Cannot exceed 50 characters.
- Syntax: string
+Criteria:
- Begins parsing the Criteria section
- Contains no value
+Type:
- The criteria type. Must be one of "Custom", "Number of Kills", or "Weapons Fired"
- Syntax: string
+Target:
- The target of the achievement criteria.
- If the type is Number of Kills then this should be a ship class. If the type is Weapons Fired this should be a weapon class. For other criteria types this field is discarded.
- This value is optional. If not provided then all ships or weapons count towards the achievement.
- Syntax: string
+Threshold:
- The threshold of the criteria. IE: The number of whatever the player must reach to unlock the achievement.
- For singular event custom achievements a value of 1 should be used.
- This value is optional. If not provided, a default width of 1 will be used.
- Syntax: integer
+Hidden:
- Specifies if the achievement should be hidden until unlocked
- This value is optional. If not provided, a default height of false will be used.
- Syntax: boolean
+Color:
- The color of the text for the achievement in the UI.
- Use R,G,B,A format. A is optional and defaults to 255.
- This value is optional. If not provided, the color will be the UI default.
- Syntax: integer, integer, integer, integer
+Bar Color:
- The color of the progress bar for the achievement in the UI.
- Use R,G,B,A format. A is optional and defaults to 255.
- This value is optional. If not provided, the color will be the UI default.
- Syntax: integer, integer, integer, integer
Example
#ACHIEVEMENTS
$Name: Achievement name (required)
+Description: Description text (required)
+Criteria:
+Type: Number of Kills, Weapons Fired, Custom (required)
+Target: Ship class or weapon Class (optional)
+Threshold: Number greater than 0 (optional)
+Hidden: boolean (optional, default: false)
+Color: 128, 128, 128, 255
+Bar Color: 255, 0, 0, 255
#END