A lot of parameters in SPG2 is handled through databases. Database definition is saved as a *.wdb (Whale Database) file, while individual tables are *.wdt (Whale Data Table) files.

Tables can be either in text or binary format. Text format tables have an initial "txt", while binary tables have "bin" in the header.

Tables (text format) can be edited with
Notepad++,
OpenOffice Calc or
Microsoft Excel.
They consist of a header with the basic info and data sorted in rows and columns. Columns are separated by tab.

Due to the nature of database tables, using Excel or Calc is advised. It gives a much better overview of the entire table than you could get in a plain text editor.
Simply select the entire contents of a *.wdt file and copy/paste it into Excel or Calc. Make the wanted modifications and then copy/paste it back into *.wdt file.
Remove the empty line usually added by Notepad++ automatically.

To prevent Excel or Calc from doing any auto-correction and changing existing data on copy/paste, please follow this procedure:

open the *.wdt file with the Notepad or Notepad++

select the entire contents and copy it

open an Excel/Calc spreadsheet

CTRL+A to select the entire spreadsheet (empty) and set cell formatting to text(!)

select a single cell and paste the data from the *.wdt file

edit the data

select all data in Excel and paste it over the existing data in *.wdt file

Setting cell formatting to text is important as then Excel won't for example switch float numbers (decimal numbers)
into calender dates (which it does sometimes when formatting is set to General).

TABLES

(Click for details)

Accidents

Small random events that are focused on the player ship.

COLUMN

DESCRIPTION

Id

Unique Id

Name

Name used in the game

Achievements

COLUMN

DESCRIPTION

Id

Unique Id

Name

Name used in the game

DescriptLine

Text line from Texts\descriptions.txt (line counting starts from 0!)

BonusId

Bonus Id from Base\Bonuses.wdt

Modifier

Bonus amount gained by the previous BonusId

StatsKey

DEPRECATED

Alignment

Alignment types.

COLUMN

DESCRIPTION

Id

Unique Id

Name

Name used in the game

AreaEffects

Area effects like radiation etc.

COLUMN

DESCRIPTION

Id

Unique Id

Name

Name used in the game

Base

General list of database tables used by the game.

DO NOT alter this table as it WILL CRASH THE GAME!

Beams

List of coordinates for beam patches used in the game's beam-like visual effects.

COLUMN

DESCRIPTION

Id

Unique Id

U1

Texture coordinate

V1

Texture coordinate

U2

Texture coordinate

V2

Texture coordinate

Bonuses

All bonuses available in the game. These are referenced by other database tables (enhancements, officers, equipment...)

Adding more bonuses will not result in the bonus actually doing anything since it has to be hard-coded!