Data Database Modding

_id Values for Modders
It is recommend to use _id values for your modded data that are an order of magnitude higher than the existing data in the game data database. For example, if the highest _id in the ShipComponent table is currently 626, considering using _id=1000 or _id=2000 for your new ShipComponents as this will make your mod (and the saved games players create with it) more update-ready.

A mod creator does not need to update their mod's game data database to match the latest version shipped with the baseline of the game. However, if you do decide to update your data database, you may find that we have added a ShipComponent with _id=627. Starting at a higher order _id for your mods would remove any chance of a conflict in this case.

data.db Schema
The game's data dabase (data.db) is a SQLite database that contains all of the read-only run-time data used by Star Traders: Frontiers during gameplay and contains the following tables and schemas.

Version PRAGMA
The game's data database is version-stamped using a SQLite3 PRAGMA called 'version' which must match the current mod build. To extract the version, run the command '.pragma user_version' and to write the version, run the command '.pragma user_version = XXXX' where XXXX is your version ID number (a large six or seven digit number.)

https://sqlite.org/pragma.html#pragma_user_version

Table ShipType
For details on modding ships, see Modding Ships.

Table Job
Each Job needs 36 entries, all with the same JobType key and covering jobLevel 1 to 36. Each row indicates the Skill granted by that row.

Generated Tables
Some tables contain data that must be generated from other assets:


 * RegionMapData
 * RegionMapGate
 * RegionMapWorld