Asteroid.tbl

From FreeSpace Wiki
Revision as of 03:39, 8 June 2021 by Asteroth (talk | contribs) ($Spawn Weight:: make the formatting a little nicer)
Jump to: navigation, search

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.

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)
  • 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.
  • 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".


$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
  • Syntax: String.pof or none, filename


$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
  • Syntax: String.pof or none, filename


$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


$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:
  • Defines what kind of asteroids this type of asteroid should split into when destroyed. You may define any number of $Split rules.
  • 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


$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 'special' asteroids (not the first 3)
  • 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