Repository navigation
asteroid.tbl
Revision information OFP Revision: #108 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.
The asteroid.tbl defines the asteroids and debris pieces used in asteroid and debris fields.
This table is one of the Modular Tables and can be extended with xxx-ast.tbm.
Code: /asteroid/asteroid.cpp. See Tables for every table.
Badges show the version a field or behavior was added in. Fields without a badge are from the original game.
Field index (every field, one per line in table order; click one to jump to it)
- $Name:
- +nocreate
- $Display Name:
- $Type:
- $POF file1:
- $POF file2:
- $POF file3:
- $Subtype:
- $Detail distance:
- $Max Speed:
- $Rotational Velocity Multiplier:
- $Damage Type:
- $Explosion Effect:
- $Explosion Animations:
- $Explosion Radius Mult:
- $Breakup Delay:
- $Expl inner rad:
- $Expl outer rad:
- $Expl damage:
- $Expl blast:
- $Hitpoints:
- $Split:
- $Split Name:
- $Spawn Weight:
- $Gravity Const:
#Asteroid Types
$Name: ...
(asteroid and debris entries)
#End
(settings after #End)
- No asteroids in any table means asteroid fields won't work, and the log says so.
- Used to define asteroid types and their physical characteristics
- Every entry is either one of the three asteroid sizes (small, medium, large) or a debris piece. After all tables are read:
- The first entry with
$Type:0, 1 and 2 becomes the small, medium and large asteroid. - A size nobody set takes the first entry left over, in table order, so a table without
$Type:works as retail's did: its first three entries are small, medium and large. - Every other entry is debris. An extra small, medium or large entry is turned into debris, with a warning.
- The first entry with
- Each entry needs at least one model. One without is an error.
The following is no longer required. As many or as few 'special' asteroids can be defined as desired.
- Then, each species requires 3 asteroids (retail used these for debris-type asteroids)
The following is only true if $Type is not defined.
- The first 3 correspond to the 1st species in the species_defs.tbl, the second to the next 3, etc.
- Defines the name of asteroid or debris object. Does NOT need to be unique.
Name should be unique
- This will be used as the name in the targeting box when targeted, unless the name is "[Any species] Debris #", where it will be displayed as "[Species] debris".
- A name used twice in asteroid.tbl is an error. In a modular table, a name that already exists edits that entry.
- Optional. Goes directly after
$Name:. - In a modular table, edits the entry only if it already exists, instead of creating a new one.
- Using it in asteroid.tbl itself logs a warning.
- Defines the text that will be used in the targetbox for this asteroid. Only used for debris type asteroids.
- Syntax: String
- Defines the type of asteroid this is.
- Syntax: Integer: 0 for small asteroid, 1 for medium asteroid, 2 for large asteroid, -1 for debris
- Default: -1 (debris). Any other value is an error, and the entry is treated as debris.
- Defines the name of the model file (.pof) used for asteroid or debris model
-
$POF file1:,$POF file2:and$POF file3:define the asteroid subtypes named Brown, Blue and Orange, the subtypes a mission's asteroid field picks from. In a modular table, setting one again replaces that subtype's model. - Syntax: String.pof, filename
- Note: This does not work for debris chunks. The game will always only use POF file1.
- Defines the name of the alternate asteroid or debris model of the set size
-
Required for asteroid types, ignored otherwise
-
Syntax: String.pof or none, filename
- Note: This does not work for debris chunks. The game will always only use POF file1.
- Defines the name of the alternate asteroid model
- If the object in question is has $POF file2: set as none then this entry is not needed
-
Required for asteroid types, ignored otherwise
-
Syntax: String.pof or none, filename
- Adds another subtype, beyond Brown, Blue and Orange, that a mission's asteroid field can pick. Any number can be added. Asteroid types only; debris uses only its first model.
- Syntax: String, the subtype name. A name the asteroid already has is an error.
- The model file for this subtype.
- Syntax: String.pof, filename
- Defines the distance where the change between different Levels-Of-Details (LODs) occurs
- Syntax: ( Integer list ), comma separated integers, one for each LOD
- Example: (0, 30, 80, 150)
- Up to 5 values.
- Defines the maximum velocity of the asteroid
- Syntax: Float, meters per second
- Defines the value that randomized rotational velocity is multiplied by. For each spawned asteroid/debris object FSO first calculates a random normalized vector. Then it calculates a rotational value with the formula 'value of $Rotational Velocity Multiplier: * (frand()/4.0f + 0.1f)'.
- Syntax: Float, multiplier value
- Defines the damage type of the asteroid explosion. REQUIRES ADDITIONAL TABLE FILE.
- Syntax: String, name of the damage type as referenced in armor.tbl
- The particle effect played when the asteroid is destroyed. If this is set,
$Explosion Animations:and$Explosion Radius Mult:are not read. - Requires
$Breakup Delay:; without it, an error is logged. - Syntax: String, the particle effect name
- Defines the explosion animations used for the asteroid.
- Syntax: Integer list, indices to fireballs defined in fireball.tbl
- Defines the radius multiplier for the explosion fireballs, with a value of 1.0 causing the radius of the fireball to be equal to the radius of the asteroid. Defaults to 1.5 for large asteroids and 1.0 for others.
- Syntax: Float
- How long after being destroyed the asteroid breaks apart, so an
$Explosion Effect:can play first. - Syntax: Float, seconds
- Radius at which the full explosion damage is done
- Syntax: Float, meters
- Maximum radius at which any damage is done
- Syntax: Float, meters
- Amount of damage done inside the inner radius
- Syntax: Float, damage
- The intensity of the blast effect (impulse, aka change in momentum) when you're within the outer radius
- Syntax: Float, blast effect
- Defines the hitpoints of the asteroid or debris piece. Hitpoints are modified downward by skill level.
- Syntax: Float, hitpoints
- Defines what kind of asteroids this type of asteroid should split into when destroyed. You may define any number of $Split rules.
-
Semi-deprecated; still works but prefer $Split Name instead, especially if using modular tables.
-
Syntax: Integer, an asteroid index. The first asteroid defined by the table has index 0, the second one has index 1, and so on. An index that doesn't exist yet when the line is read logs a warning and is skipped.
-
+Min:
- The minimum number of spawned asteroids. Default 0.
- Syntax: Integer
-
+Max:
- The maximum number of spawned asteroids. Default 0.
- Syntax: Integer
- Defines what kind of asteroids this type of asteroid should split into when destroyed. You may define any number of $Split rules.
- Syntax: String, an asteroid name. Names are checked after every table is read, so an asteroid defined later can be named. An unknown name logs a warning and is removed.
-
+Min:
- The minimum number of spawned asteroids. Default 0.
- Syntax: Integer
-
+Max:
- The maximum number of spawned asteroids. Default 0.
- Syntax: Integer
- Defines the relative frequency among other asteroids in the field to be spawned. The total number of asteroids is unchanged, but an asteroid with twice the Spawn weight of another will appear twice as frequently as it.
- Only used by 'debris' asteroids
- The default is based on its position in the list:
- 4, 7, 10 etc have a weight of 1.
- 5, 8, 11, etc have a weight of 4.
- 6, 9, 12, etc have a weight of 8.
- Syntax: Float, positive. A value of 0 or less logs a warning and 1 is used. Setting it on a small, medium or large asteroid logs a warning and is ignored.
- How strongly the mission's gravity affects this asteroid. 0 (the default) means not at all, 1 means fully.
- Syntax: Float, multiplier
These go after #End, in any of the tables. Each applies to every asteroid.
- The particle effect played where a weapon hits an asteroid. If this is set,
$Impact Explosion:and$Impact Explosion Radius:are not read. - Syntax: String, the particle effect name
- The animation played where a weapon hits an asteroid.
- Syntax: Filename
- The radius of that animation.
- Syntax: Float, meters
An impact explosion is required: without one from $Impact Explosion Effect: or $Impact Explosion:, the game stops with an error.
- The model shown in the briefing closeup for an asteroid field icon.
- Default: the large asteroid's first model
- Syntax: String.pof, filename
- The camera position for that closeup.
- Default: 0, 0, -334
- Syntax: Vector, three floats
- The camera zoom for that closeup.
- Default: 0.5
- Syntax: Float
- Single asteroid entry for retail FS2 table
#Asteroid Types
$Name: Small Asteroid
$POF file1: ast03.pof
$POF file2: asta03.pof
$POF file3: astb03.pof
$Detail distance: (0, 30, 80, 150)
$Max Speed: 60.0
$Expl inner rad: 0.0
$Expl outer rad: 0.0
$Expl damage: 0.0
$Expl blast: 0.0
$Hitpoints: 23
#End
$Impact Explosion: ExpMissilehit1
$Impact Explosion Radius: 20.0
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