Repository navigation
Decals
Revision information OFP Revision: #116 Set the revision to your PR when your PR changes what this page documents. Leave it alone for edits that only fix or improve the documentation.
Decal tables define decals: images drawn onto a model's surface, such as weapon impact marks, that stay for a while or for good.
There is no decals.tbl itself: decals are only read from modular tables named xxx-dcl.tbm.
Decals need deferred lighting. On a system without it, the decal system turns itself off and the log says so. Players can also turn decals off in the graphics options.
Code: /decals/decals.cpp. See Tables for every table.
Badges show the version a field or behavior was added in.
Field index (every field, one per line in table order; click one to jump to it)
- Each file has one section, starting with
#Decalsand ending with#End. - Each decal starts with
$Decal:. Its fields must be in the order listed here.
- Starts a decal definition. Weapons refer to it by this name.
- Names are case-sensitive and aren't checked for duplicates: if two decals share a name, the first one is used. A later table can't change an existing decal.
- Syntax: String
- The diffuse (color) map. Can be an animation.
- Syntax: String, file name without an extension. A name that isn't a valid file name is an error and is ignored; one that fails to load logs a warning.
- Whether the animation loops.
- Default: YES
- Syntax: Boolean
- The glow map. Can be an animation.
- Syntax: String, file name without an extension, as for
+Diffuse:.
- Whether the animation loops.
- Default: YES
- Syntax: Boolean
- The normal map. Can be an animation.
- Syntax: String, file name without an extension, as for
+Diffuse:.
- Whether the animation loops.
- Default: YES
- Syntax: Boolean
A weapon in weapons.tbl leaves a decal where it hits with $Impact Decal::
- The name of a decal defined here. An unknown name is an error.
- The size of the decal. Required for a new weapon.
- Syntax: Float, meters, or a random range.
- How long the decal stays. Required for a new weapon.
- Syntax:
Eternalto keep it for good, or Float, seconds, or a random range.
- Rotates each decal randomly, so repeated impacts don't all look the same.
- Syntax: Boolean
#Decals
$Decal: Scorch
+Diffuse: scorch_d
+Glow: scorch_g
+Loop: NO
+Normal: scorch_n
#End
In weapons.tbl:
$Impact Decal: Scorch
+Radius: 4
+Lifetime: 30
+Use Random Rotation: YES
Getting Started
Features
SEXPs
Lua Scripting
Tables
-
Tables
- ai.tbl
- Animation (-anim.tbm)
- armor.tbl
- asteroid.tbl
- autopilot.tbl
- cheats.tbl
- colors.tbl
- controlconfigdefaults.tbl
- coordinate_points.tbl
- credits.tbl
- curves.tbl
- cutscenes.tbl
- Decals (-dcl.tbm)
- default_settings.tbl
- Dynamic SEXPs (-sexp.tbm)
- editor.tbl
- fireball.tbl
- fonts.tbl
- game_settings.tbl
- generated_nebula.tbl
- glowpoints.tbl
- help.tbl
- hud_gauges.tbl
- icons.tbl
- iff_defs.tbl
- intel.tbl
- lighting_profiles.tbl
- lightning.tbl
- mainhall.tbl
- medals.tbl
- messages.tbl
- mflash.tbl
- mission_profiles.tbl
- music.tbl
- nebula.tbl
- objecttypes.tbl
- Particle Effects (-part.tbm)
- post_processing.tbl
- props.tbl
- rank.tbl
- scripting.tbl
- ships.tbl
- sounds.tbl
- species_defs.tbl
- ssm.tbl
- stars.tbl
- strings.tbl
- tips.tbl
- traitor.tbl
- tstrings.tbl
- virtual_pofs.tbl
- weapons.tbl