Modular Tables

From FreeSpace Wiki
Revision as of 20:36, 16 March 2010 by TopAce (talk | contribs) (you pronounce it as "es-cee-pee", so you need this indef. article here)
Jump to: navigation, search

Modular tables are an SCP addition to the standard FreeSpace table system. Each modlar table (.tbm extension) adds or modifies data from its related base table (.tbl extension). So there's no more need to edit the 'parent' table. A modular table file is not restricted to one entry.

The base table each modular table modifies depends on the ending three letters of its name. See the list of supported modular tables below.

Important Notes. Loading Order

  • Modular table files should use the 'parent table' sections. They should also keep their entry order.
  • Completely new entries and also complete rewrites of entries in parent table file are always possible.
  • Loading order:
    • The base table (.tbl) is loaded first despite its location priority, (see -mod flag help for more info about priority places). Of course, if there are several versions of the same base table in several vps or /data/tables folders, only the highest priority one will be loaded.
    • Then, ALL its related tbms are loaded, even if they are in a lower priority place than the base tbl table. I.e, tbms are always applied. If there are several versions of the same file you can imagine what happens.
    • When they are loaded, tbms start being applied in reverse priority order; ie, tbms are applied from the lowest priority place to the highest priority place.
    • The former rule makes that, if there are conflictive entries in several tables, the highest priority ones will override the rest because they will be the last applied changes.

      EXTREMELY IMPORTANT NOTE: Because of an already solved bug, fs_open versions till 3.6.9. (included) apply tbms in direct priority order, from the highest priority to the lowest one. In this way, the lowest priority entries override the rest. As example, this issue makes impossible overriding mediavps tbm settings from any tbm inside a main mod which uses this art enhancement as a secondary mod. The only way you have is overriding the whole table as explained below.

      WARNING: Never use conflictive tbms inside the same priority location, (vp or /data/tables folder). For example, do not put aaa-shp.tbm and bbb-shp.tbm inside the same vp if they have conflictive entries. Due technical design there is no easy way to know their loading order. For the final user, finally applied entries will seem randomly selected. Alphabetical sorting is not applied here. Only vps are alphabetically ordered when loaded; individual files, (like tbms), aren't, it doesn't matter if they are obtained either from hard disk folders or from inside a vp archive.
      Nevertheless, this is a pretty strange mod design: why should you put conflictive versions of any class of modular table in the same location?, just edit and merge them deleting undesired entries. But this warning can be also understood in the following way:
      Be careful if you split one tbm in several ones due to any reason, (tracking changes, management of different groups of parameters or whatever), always check that they all are fully complementary with no conflictive entries.

    • Derived from priority and tbm handling, the only two ways to override the settings of AnExistingTable-xxx.tbm are:
      • Adding another AnExistingTable-xxx.tbm in a higher priority place so it gets loaded instead of the original version.
      • Overriding every single AnExistingTable-xxx.tbm entry, using one or several other -xxx.tbm tables located in higher priority places.

eXtendable Modular Tables

In addition, some modular tables are XMTs (or eXtentable Modular Tables). They offer capability to add new partial entries or make partial editing to each entry. Within XMT tbms:

  • All fields are optional. But toplevel entries, of course, because you do need to specify which item you want to modify ;-) .
  • Toplevel entries can replace part of other existing toplevel entries. Only changed parameters should be specified.
  • Addition of the +nocreate parameter. This parameter should be entered right after entry name and prevents possible creation of partially undefined entry. For example, if the parent table file lacked the entry that was included to the as a partial entry to the modular table file then the creation of partially undefined entry is possible which could cause problems with the game.
    • Example:
  $Name:              @Subach HL-7

Supported Modular Tables

The list of supported tbms is:

Other special modular tables are:

Sample - Alpha-wep.tbm

  • Changes the speed of the Subach HL-7 and also adds a faint grey trail to it.
  • To create it make a text file using a text editor and save the file as Alpha-wep.tbm with the following contents to the proper folder (.../data/tables).
  #Primary Weapons
  $Name:              @Subach HL-7
  $Velocity:         650.0	
     +Start Width:      0.4
     +End Width:        0.0
     +Start Alpha:      0.35
     +End Alpha:        0.0
     +Max Life:         0.2
     +Bitmap:           Contrail