Difference between revisions of "Asteroid.tbl"
From FreeSpace Wiki
m (updated version info) |
Goober5000 (talk | contribs) m (→$Rotational Velocity Multiplier:: fix typo) |
||
(19 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{TableVersion|5264}} | |
− | + | {{Tables}} | |
− | + | The '''asteroid.tbl''' is used to define all of the asteroids and debris field pieces in-game. | |
+ | This table is one of the [[Modular Tables]] and can be extended with xxx-ast.tbm | ||
==General Format== | ==General Format== | ||
− | |||
*'''#Asteroid Types''' | *'''#Asteroid Types''' | ||
*Asteroid and debris data | *Asteroid and debris data | ||
Line 19: | Line 19: | ||
==Asteroid and Debris Data== | ==Asteroid and Debris Data== | ||
*Used to define asteroid types and their physical characteristics | *Used to define asteroid types and their physical characteristics | ||
− | *First three entries are different sized asteroids, small medium and large respectively | + | *First three entries are different sized asteroids, small medium and large respectively, and are required. |
− | * | + | |
− | + | {{Table212|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) | ||
+ | {{Table224|The following is only true if [[Asteroid.tbl#$Type:|$Type]] is not defined.}} | ||
+ | *The first 3 correspond to the 1st species in the [[species_defs.tbl]], the second to the next 3, etc. | ||
===$Name:=== | ===$Name:=== | ||
− | *Defines the name of asteroid or debris object | + | *Defines the name of asteroid or debris object. Does NOT need to be unique. |
+ | {{Table224|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". | ||
+ | |||
+ | |||
+ | ===$Display Name:=== | ||
+ | {{Table224| | ||
+ | *Defines the text that will be used in the targetbox for this asteroid. Only used for debris type asteroids. | ||
+ | *Syntax: '''String'''}} | ||
+ | |||
+ | |||
+ | ===$Type:=== | ||
+ | {{Table224| | ||
+ | *Defines the type of asteroid this is. | ||
+ | *Syntax: '''Integer''' 1 for small asteroid, 2 for medium asteroid, 3 for large asteroid, -1 for debris}} | ||
Line 34: | Line 51: | ||
===$POF file2:=== | ===$POF file2:=== | ||
+ | *'''''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 | *Defines the name of the alternate asteroid or debris model of the set size | ||
+ | {{Table224| | ||
+ | *Required for asteroid types, ignored otherwise}} | ||
*Syntax: '''String.pof''' or '''none''', filename | *Syntax: '''String.pof''' or '''none''', filename | ||
===$POF file3:=== | ===$POF file3:=== | ||
+ | *'''''Note: This does not work for debris chunks. The game will always only use POF file1.''''' | ||
*Defines the name of the alternate asteroid model | *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 | *If the object in question is has '''$POF file2:''' set as ''none'' then this entry is not needed | ||
+ | {{Table224| | ||
+ | *Required for asteroid types, ignored otherwise}} | ||
*Syntax: '''String.pof''' or '''none''', filename | *Syntax: '''String.pof''' or '''none''', filename | ||
Line 54: | Line 77: | ||
*Syntax: '''Float''', meters per second | *Syntax: '''Float''', meters per second | ||
+ | |||
+ | ===$Rotational Velocity Multiplier:=== | ||
+ | {{Table234| | ||
+ | *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}} | ||
===$Damage Type:=== | ===$Damage Type:=== | ||
− | {{ | + | {{Table3610| |
*Defines the damage type of the asteroid explosion. '''REQUIRES ADDITIONAL TABLE FILE'''. | *Defines the damage type of the asteroid explosion. '''REQUIRES ADDITIONAL TABLE FILE'''. | ||
*Syntax: '''String''', name of the damage type as referenced in [[armor.tbl]]}} | *Syntax: '''String''', name of the damage type as referenced in [[armor.tbl]]}} | ||
− | {{ | + | |
− | * | + | ===$Explosion Animations:=== |
+ | {{Table3615| | ||
+ | *Defines the explosion animations used for the asteroid. | ||
+ | *Syntax: '''''Integer list''''', indices to fireballs defined in fireball.tbl}} | ||
+ | |||
+ | |||
+ | ===$Explosion Radius Mult:=== | ||
+ | {{Table3615| | ||
+ | *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'''''}} | ||
Line 88: | Line 125: | ||
*Syntax: '''Float''', hitpoints | *Syntax: '''Float''', hitpoints | ||
+ | |||
+ | ===$Split:=== | ||
+ | {{Table3615| | ||
+ | *Defines what kind of asteroids this type of asteroid should split into when destroyed. You may define any number of $Split rules. | ||
+ | {{Table224| | ||
+ | *Semi-deprecated; still works but prefer [[Asteroid.tbl#$Split_Name:|$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. | ||
+ | *'''+Min:''' | ||
+ | **The minimum number of spawned asteroids. Default 0. | ||
+ | **Syntax: '''Integer''' | ||
+ | *'''+Max:''' | ||
+ | **The maximum number of spawned asteroids. Default 0. | ||
+ | **Syntax: '''Integer'''}} | ||
+ | |||
+ | ===$Split Name:=== | ||
+ | {{Table224| | ||
+ | *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. | ||
+ | *'''+Min:''' | ||
+ | **The minimum number of spawned asteroids. Default 0. | ||
+ | **Syntax: '''Integer''' | ||
+ | *'''+Max:''' | ||
+ | **The maximum number of spawned asteroids. Default 0. | ||
+ | **Syntax: '''Integer'''}} | ||
+ | |||
+ | |||
+ | ===$Spawn Weight:=== | ||
+ | {{Table212| | ||
+ | *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}} | ||
==Sample== | ==Sample== |
Latest revision as of 04:54, 19 November 2023
Revision information.....
- FSO Revision: 5264
Note: Please update the version when the page is updated. If your edit had nothing to do with new code entries then please do not edit the version
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 |
The asteroid.tbl is used to define all of the asteroids and debris field pieces in-game.
This table is one of the Modular Tables and can be extended with xxx-ast.tbm
Contents
- 1 General Format
- 2 Asteroid and Debris Data
- 2.1 $Name:
- 2.2 $Display Name:
- 2.3 $Type:
- 2.4 $POF file1:
- 2.5 $POF file2:
- 2.6 $POF file3:
- 2.7 $Detail distance:
- 2.8 $Max Speed:
- 2.9 $Rotational Velocity Multiplier:
- 2.10 $Damage Type:
- 2.11 $Explosion Animations:
- 2.12 $Explosion Radius Mult:
- 2.13 $Expl inner rad:
- 2.14 $Expl outer rad:
- 2.15 $Expl damage:
- 2.16 $Expl blast:
- 2.17 $Hitpoints:
- 2.18 $Split:
- 2.19 $Split Name:
- 2.20 $Spawn Weight:
- 3 Sample
General Format
- #Asteroid Types
- Asteroid and debris data
- #End
- $Impact Explosion:
- Defines the effect used when weapon strikes at asteroid
- Syntax: Filename
- $Impact Explosion Radius:
- Defines the radius of the effect
- Syntax: Value, (meters)
Asteroid and Debris Data
- Used to define asteroid types and their physical characteristics
- First three entries are different sized asteroids, small medium and large respectively, and are required.
FS2 Open, 21.2: 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)
FS2 Open, 23.0: 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.
$Name:
- Defines the name of asteroid or debris object. Does NOT need to be unique.
FS2 Open, 23.0: 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".
$Display Name:
FS2 Open, 23.0:
- Defines the text that will be used in the targetbox for this asteroid. Only used for debris type asteroids.
- Syntax: String
$Type:
FS2 Open, 23.0:
- Defines the type of asteroid this is.
- Syntax: Integer 1 for small asteroid, 2 for medium asteroid, 3 for large asteroid, -1 for debris
$POF file1:
- Defines the name of the model file (.pof) used for asteroid or debris model
- Syntax: String.pof, filename
$POF file2:
- 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
FS2 Open, 23.0:
- Required for asteroid types, ignored otherwise
$POF file3:
- 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
FS2 Open, 23.0:
- Required for asteroid types, ignored otherwise
$Detail distance:
- Definies 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)
$Max Speed:
- Defines the maximum velocity of the asteroid
- Syntax: Float, meters per second
$Rotational Velocity Multiplier:
FS2 Open, 24.0:
- 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
$Damage Type:
FS2 Open 3.6.10:
- Defines the damage type of the asteroid explosion. REQUIRES ADDITIONAL TABLE FILE.
- Syntax: String, name of the damage type as referenced in armor.tbl
$Explosion Animations:
FS2 Open, 3.6.16:
- Defines the explosion animations used for the asteroid.
- Syntax: Integer list, indices to fireballs defined in fireball.tbl
$Explosion Radius Mult:
FS2 Open, 3.6.16:
- 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
$Expl inner rad:
- Radius at which the full explosion damage is done
- Syntax: Float, meters
$Expl outer rad:
- Maximum radius at which any damage is done
- Syntax: Float, meters
$Expl damage:
- Amount of damage done inside the inner radius
- Syntax: Float, damage
$Expl blast:
- The intensity of the blast effect when you're within the outer radius
- Syntax: Float, blast effect
$Hitpoints:
- Defines the hitpoints of the asteroid or debris piece. Hitpoints are modified downward by skill level.
- Syntax: Float, hitpoints
$Split:
FS2 Open, 3.6.16:
Syntax: Integer, an asteroid index. The first asteroid defined by the table has index 0, the second one has index 1, and so on.
+Min:
+Max:
- Defines what kind of asteroids this type of asteroid should split into when destroyed. You may define any number of $Split rules.
FS2 Open, 23.0:
- Semi-deprecated; still works but prefer $Split Name instead, especially if using modular tables.
- The minimum number of spawned asteroids. Default 0.
- Syntax: Integer
- The maximum number of spawned asteroids. Default 0.
- Syntax: Integer
$Split Name:
FS2 Open, 23.0:
- 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.
- +Min:
- The minimum number of spawned asteroids. Default 0.
- Syntax: Integer
- +Max:
- The maximum number of spawned asteroids. Default 0.
- Syntax: Integer
$Spawn Weight:
FS2 Open, 21.2:
- 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
Sample
- Single asteroid entry fos 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