MODDING DATABASES

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:

  1. open the *.wdt file with the Notepad or Notepad++
  2. select the entire contents and copy it
  3. open an Excel/Calc spreadsheet
  4. CTRL+A to select the entire spreadsheet (empty) and set cell formatting to text(!)
  5. select a single cell and paste the data from the *.wdt file
  6. edit the data
  7. 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.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

Achievements

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
DescriptLineText line from Texts\descriptions.txt (line counting starts from 0!)
BonusIdBonus Id from Base\Bonuses.wdt
ModifierBonus amount gained by the previous BonusId
StatsKeyDEPRECATED

Alignment

Alignment types.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

AreaEffects

Area effects like radiation etc.

COLUMNDESCRIPTION
IdUnique Id
NameName 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.

COLUMNDESCRIPTION
IdUnique Id
U1Texture coordinate
V1Texture coordinate
U2Texture coordinate
V2Texture 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!

COLUMNDESCRIPTION
IdUnique Id
DescriptLine Text line from Texts\descriptions.txt (line counting starts from 0!)
FilterDEPRECATED
ValueType Variable type used in code to display information appropriately ( 0=Int | 1=Float | 2=Boolean )

Chatters

Bridge officer chatter list.

COLUMNDESCRIPTION
IdUnique Id
SortType of chatter, used in code to determine when the chatter can be heard. Check the VO Sort list list in the Miscellaneous section to determine the appropriate Sort if adding new VO.
File Path to audio file

Cloak

Cloak field enhancements database.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

CombatAI

List of available types of CombatAI routines that can be set to a ship via the World Editor or through scripts.

Adding more CombatAI entires will not result in the AI actually doing anything since each one has to be hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
FilePath to the CombatAI definition file

Commodities

Database of all available commodities.

COLUMNDESCRIPTION
IdUnique Id
TypeTypeId from Base\CommodityType.wdt
NameName used in the game
DescriptLineText line from Texts\descriptions.txt (line counting starts from 0!)
FilePath to file that contains the icon used by the World editor
IconIdId of the icon in the file. Counting starts from 0, slot by slot (64x64 size)
PriceDefault price. Actual price is set in the station/planet properties
IconFilePath to the file that contains the icon
IconXIcon coordinate on texture
IconYIcon coordinate on texture
IconWIcon coordinate on texture
IconHIcon coordinate on texture
IconSmallFilePath to file that contains the small icon
IconXSmall icon coordinate on texture
IconYSmall icon coordinate on texture
IconWSmall icon coordinate on texture
IconHSmall icon coordinate on texture
IconBigFilePath to file that contains the large icon
IconXLarge icon coordinate on texture
IconYLarge icon coordinate on texture
IconWLarge icon coordinate on texture
IconHLarge icon coordinate on texture

CommodityType

Types of commodities (ore, consumable...)

COLUMNDESCRIPTION
IdUnique Id
TypeCommodity type name used in the game.

Debris

List of debris assemblies used in the various visual effects in the game via scripts.
The only parameter is the path to the assembly file that holds debris models.
ID counting starts from 0!

Debris:
{
  Assembly:
  {
    Name: Spg2\SpecialEffect\ModelSpecialEffect\Sparks\spark.asb
  }
}

EditorAnomalies

List of anomalies. You must add an entry for a new anomaly before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
FilePath to the *.asb file of the anomaly
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

EditorAsteroids

List of asteroid fields. You must add an entry for a new anomaly before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
IconFilePath to file that contains the icon used in the World editor
IconIdId of the icon in the file. Counting starts from 0, slot by slot (64x64 size)
AsbFilePath to the *.asb file of the asteroid field
MapRowIdRow Id that shows the game what patches to use on the Starchart

EditorDerelicts

List of derelicts. You must add an entry for a new derelict before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
FilePath to file that contains the icon used in the World editor
IconFilePath to file that contains the icon used in the World editor
IconIdId of the icon in the file. Counting starts from 0, slot by slot (64x64 size)

EditorJunkyard

List of junkyards. You must add an entry for a new junkyard before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
IconFilePath to file that contains the icon used in the World editor
IconIdId of the icon in the file. Counting starts from 0, slot by slot (64x64 size)
AsbFilePath to the *.asb file of the junkyard

EditorNebulas

List of nebulas. You must add an entry for a new nebula before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
IconFilePath to file that contains the icon used in the World editor
IconIdId of the icon in the file. Counting starts from 0, slot by slot (64x64 size)

EditorPlanets

List of planets. You must add an entry for a new planet before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
SchemPath to the *.dds file of the planet schematic
FilePath to the *.asb file of the planet
Background Path to the *.dds file of the planet background visible when anchored on the planet
SavePicturePath to the *.dds file of the picture used when saving on the planet

EditorPlatforms

List of defense platforms. You must add an entry for a new platform before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
SchemPath to schematic representation file used in the game and World editor
FilePath to the *.asb file of the platform

EditorScenery

List of scenery assemblies. You must add an entry for a new scenery assembly before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
IconFilePath to file that contains the icon used in the World editor
IconIdId of the icon in the file. Counting starts from 0, slot by slot (64x64 size)
AsbFilePath to the *.asb file of the scenery object

EditorStations

List of station assemblies. You must add an entry for a new station assembly before you can place it via the World Editor.

You can use existing station assemblies for station objects in the World Editor. Adding new assemblies is NOT necessary!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the World editor
SchemPath to schematic representation file used in the game and World editor
FilePath to the *.asb file of the station

EditorStructures

List of structures. You must add an entry for a new structure before you can place it via the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
HPDefault Hitpoints of the structure. Actual Hitpoints can be set in the structure properties.
SchemPath to schematic representation file used in the game and World editor
FilePath to the *.asb file of the structure
SortStructure TypeId from Base\StructureSort.wdt. Context actions available in the game depend on structure type.
ActivateScriptPath to the default script used in the OnActivate event. Actual script can be changed in the structure properties.
DeactivateScriptPath to the default script used in the OnDeactivate event. Actual script can be changed in the structure properties.

Encounters

DEPRECATED!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

EnhancementType

This database is used in the World Editor for setting up what a station or planet is selling regarding Enhancements.

COLUMNDESCRIPTION
IdId of the enhancement database table
NameSystem type name
BaseIdId of the enhancement database table as seen in Base\Base.wdb
IconFileColumn Id in the database (BaseId) that contains the path containing the icon file
IconColumColumn Id in the database (BaseId) that contains the icon Id on the texture (IconFile)
PriceColumnColumn Id in the databse (BaseId) that contains Enhancement price
NameColumn Id in the database (BaseId) that contains Enhancement name

Events

List of in-game events.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

Experience

Experience table required for experience levels.

COLUMNDESCRIPTION
IdUnique Id
ExpExperience required to gain the character level

Explosion

List of explosions used in the game.

Texture = path to explosion texture file
TextureSize = texture size in pixels (Width | Height)
Frames = sequence of UV coordinates for each frame of the explosion

Explosion:
{
  Texture: Spg2\Textures\Effects\Explosion_0.dds
  TextureSize: 512 512
  Frames:
    {
      UV: 0.0 0.0 170.67 170.67
      UV: 170.67 0.0 341.33 170.67
      UV: 341.33 0.0 512.0 170.67
      UV: 0.0 170.67 170.67 341.33
      UV: 170.67 170.67 341.33 341.33
      UV: 341.33 170.67 512.0 341.33
      UV: 0.0 341.33 170.67 512.0
      UV: 170.67 341.33 341.33 512.0
      UV: 341.33 341.33 512.0 512.0
    }
}

FacAlign

This database contains all the data needed by the game to know how each faction reacts to every other faction.

It is structured as a crosswords puzzle.
0 = Enemy
1 = Neutral
2 = Allied

Id Faction0 Faction1 Faction2 ... Faction0 Faction1 Faction2

Faction

List of factions.
Be careful when adding new factions, as this list is referenced in many different situations and panels in the game, and some might not work properly afterwards!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
TypeTypeId from Base\FactionType.wdt
HostileAReputation range for hostile alignment; limit A
HostileBReputation range for hostile alignment; limit B
NeutralAReputation range for neutral alignment; limit A
NeutralBReputation range for neutral alignment; limit B
AlliedAReputation range for allied alignment; limit A
AlliedBReputation range for allied alignment; limit B

FactionType

List of faction types. Used for filtering and AI specifics in-game.
Adding new faction types might not work properly as some aspects have to be hard-coded!

COLUMNDESCRIPTION
IdUnique Id
TypeFaction type name

Fighters

List of available fighter wings.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
PriceDefault price. Actual price is set in the station/planet properties
IconFilePath to file that contains the icon (64x64; used in the WorldEditor)
IconFileIcon ID on the texture (used in the WorldEditor)
IconXIcon coordinate on texture
IconYIcon coordinate on texture
IconWIcon coordinate on texture
IconHIcon coordinate on texture
IconSmallFilePath to file that contains the small icon
IconXSmall icon coordinate on texture
IconYSmall icon coordinate on texture
IconWSmall icon coordinate on texture
IconHSmall icon coordinate on texture
ShipFilePath to the *.shp file of the planet
IconBigPath to file that contains the large icon
IconXLarge icon coordinate on texture
IconYLarge icon coordinate on texture
IconWLarge icon coordinate on texture
IconHLarge icon coordinate on texture

FreeModel

List of special assemblies used in the various visual effects in the game via scripts.
The only parameter is the path to the assembly file that holds models.
ID counting starts from 0!

FreeModel:
{
  Assembly:
  {
    Name: Spg2\Models\FreeModels\AsteroidSmoke\AsteroiSmoke.asb
  }
}

GlobalObject

DEPRECATED! The list is generated every time the game world is loaded!

COLUMNDESCRIPTION
IdUnique Id
SectorSectorId where the object exists in the game world
SortType of game object
KeyNameObject keyname as set in the sector file
NameName used in the game
ModelModel Id from appropriate database (Sort = object type = database)
FactionFaction ownership of the object
PositionXObject coordinates on X axis
PositionYObject coordinates on Y axis
PositionZObject coordinates on Z axis

Grappler

List of Grappler enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

Hangar

List of hangar enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

HeavyWeapons

List of Heavy weapons.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
DmgTypeDamage type Id
0 = Energy
1 = Projectile
2 = Plasma
PriceDefault price. Actual price is set in the station/planet properties
IconFilePath to texture file containing large icons
IconFile2Icon Id on IconSmallFile used in the World Editor
IconXLarge icon texture coordinate
IconYLarge icon texture coordinate
IconWLarge icon texture coordinate
IconHLarge icon texture coordinate
IconSmallFilePath to file that contains the small icon
IconX3Small icon texture coordinate
IconY4Small icon texture coordinate
IconW5Small icon texture coordinate
IconH6Small icon texture coordinate
IconSmallerFilePath to file that contains the smallest icon used on the schematics panel
IconX7Smallest icon texture coordinate
IconY8Smallest icon texture coordinate
IconW9Smallest icon texture coordinate
IconH10Smallest icon texture coordinate
ProjSpeedSpeed of the weapon projectile
WeapFilePath to the weapon graphics file
RangeMax range at which the weapon can be fired on the target
LifetimeProjectile duration. The projectile disappears after lifetime expires
ManufacturerFactionId from Base\Faction.wdt
HPSystem hitpoints
DmgMinMinimum damage on successful hit
DmgMaxMaximum potential damage on successful hit
DmgShieldDamage to shield factor
ReloadReload time
BlastRadiusBlast radius of hit explosion

HeavyWEnhancements

List of Heavy weapon Enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

Heroes

List of "heroes" listed on the Bounty board.

COLUMNDESCRIPTION
IdUnique Id
PortraitsRowPortrait Id from Base\Portraits.wdt
BiographyText line from Texts\Descriptions.txt
StartSectorSector Id from Base\Sectors.wdt where the hero will initially spawn
ShipFilePath to *.txt file containing hero ship parameters
LevelHero initial experience level
PriceCredits awarded for collecting the bounty on the hero

Items

List of in-game Equipment.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
DescriptLineText line from Texts\descriptions.txt (line counting starts from 0!)
PriceDefault price. Actual price is set in the station/planet properties
FilePath to file that contains the large icon
XLarge icon texture coordinate
YLarge icon texture coordinate
WLarge icon texture coordinate
HLarge icon texture coordinate
FileSmallPath to file that contains the small icon
XSmall icon texture coordinate
YSmall icon texture coordinate
WSmall icon texture coordinate
HSmall icon texture coordinate
ManufacturerFactionId from Base\Faction.wdt
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
DurationEquipment effect duration where applied
CooldownEquipment cooldown time before it can be used again
ActivationPath to Equipment activation visual effect script
DeactivationPath to Equipment deactivation visual effect script
SortEquipment sort tells the game how the Equipment works exactly

Licenses

List of Licenses.

COLUMNDESCRIPTION
IdUnique Id
FactionFactionId from Base\Faction.wdt
FactionTypeFactionType Id from Base\FactionType.wdt
NameName used in the game
FileSmallPath to file that contains the small icon
XSmall icon texture coordinate
YSmall icon texture coordinate
WSmall icon texture coordinate
HSmall icon texture coordinate
FileBigPath to file that contains the large icon
XLarge icon texture coordinate
YLarge icon texture coordinate
WLarge icon texture coordinate
HLarge icon texture coordinate
BonusIdBonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
AmountAmount applied to the bonus. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
PriceDefault price. Actual price is set in the station/planet properties

LightWeapons

List of Light weapons.

Path to file that contains the large icons
COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
HPSystem hitpoints
DmgTypeType of damage. This value is also linked to type of weapon used in code ( 0=Energy | 1=Projectile | 2=Plasma )
PriceDefault price. Actual price is set in the station/planet properties
RangeWeapon range
EnCostEnergy cost per shot
DmgMinMinimum damage on successful hit
DmgMaxMaximum potential damage on successful hit
DmgShieldShield damage factor
RateOfFireTime delay before next shot is fired.
DmgPerSecAverage damage per second. Used only as info, NOT actual damage
ManufacturerFactionId from Base\Faction.wdt
TurretModelTurret Id from Base\Turrets.wdt that the weapon will use
TurretSortNumber of joints the weapon turret has
BarrelNumber of "barrels" the turret has. Barrel number = Number of visual effects
WeapFilePath to weapon definition file
IconFilePath to file that contains icons used in the World Editor
IconXIcon texture coordinate
IconYIcon texture coordinate
IconWIcon texture coordinate
IconHIcon texture coordinate
IconSmallFilePath to file that contains small icons
IconXIcon texture coordinate
IconYIcon texture coordinate
IconWIcon texture coordinate
IconHIcon texture coordinate
IconSmallFilePath to file that contains the smallest icon used on the ship schematics panel
IconXIcon texture coordinate
IconYIcon texture coordinate
IconWIcon texture coordinate
IconHIcon texture coordinate
IconBig
IconXIcon texture coordinate
IconYIcon texture coordinate
IconWIcon texture coordinate
IconHIcon texture coordinate

LightWEnhancements

List of Light weapon Enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

Logs

List of logs listed in the Captain's log panel.

COLUMNDESCRIPTION
IdUnique Id
TypeLog/mission type. 0 = main | 1 = side
NameText line for the log name used in the game
DescriptLineText line from Texts\logs.txt (line counting starts from 0!)
ObjectiveLineText line from Texts\logs.txt (line counting starts from 0!)
SublogFlag that shows whether or not the log is parent log or not. 0 = parent | 1 = sublog
IconFilePath to file that contains the log icon
XIcon texture coordinate
YIcon texture coordinate
WIcon texture coordinate
HIcon texture coordinate
QuestIdQuest Id from QuestMain.wdt/QuestSide.wdt the log is linked to
ParentIdId of parent log from this same database
SectorIdSector Id from Base\Sectors.wdt where the quest starts
WaypointWaypoint keyname. Waypoint MUST be set to GLOBAL space in the World Editor

LootDrop

List of available loot drops referenced in a number of places (ships, derelicts...)

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
FilePath to loot drop definition file

ModelSpecialEffect

List of special effects generated via models and shaders.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

News

List of in-game news and templates.

COLUMNDESCRIPTION
IdUnique Id
TypeNews type (history, random, main mission...)
TitleLineText line from Texts\logs.txt (line counting starts from 0!)
NewsLineText line from Texts\logs.txt (line counting starts from 0!)
WaypointWaypoint keyname that shows position in the game world where the news happened. Waypoint MUST be placed in GLOBAL space in the World Editor

OfficerClass

List of officer classes.
Adding new officer classes will NOT result in anything since the functionality has to be hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

Officers

List of available officers.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
FactionFactionId from Base\Faction.wdt
ClassClass id from Base\OfficerClass.wdt. Officer's function on ship depends on his/her class
RankOfficer rank Id from Base\Ranks.wdt
PriceDefault price. Actual price is set in the station/planet properties
SalaryMonthly Credit pay
IconFileBigPath to file that contains the large icon
IconXIcon texture coordinate
IconYIcon texture coordinate
IconWIcon texture coordinate
IconHIcon texture coordinate
IconFileSmallPath to file that contains the small icon
IconX2Icon texture coordinate
IconY2Icon texture coordinate
IconW2Icon texture coordinate
IconH2Icon texture coordinate
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )

Options

List of in-game options entries.
Adding new option entries will NOT result in anything since the functionality has to be hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
SortOption sort. Used in-code. DO NOT CHANGE!
TypeOption control type. DO NOT CHANGE!
GameIdHard-coded Id number. DO NOT CHANGE!

Particles

List of particle patch coordinates to be used to create particle-based visual effects.

COLUMNDESCRIPTION
IdUnique Id
U1Patch texture coordinate
V1Patch texture coordinate
U2Patch texture coordinate
V2Patch texture coordinate

Perks

List of perks.
Limited modability due to some parts of the linked interface being hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
BonusIDBonus Id from Base\Bonuses.wdt
Leve1Amount applied to the bonus on first level. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
Level2Amount applied to the bonus on second level. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
Level3Amount applied to the bonus on third level. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )

Portraits

List of character portraits referenced in other databases.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
TexturePath to portrait texture file

PowerCore

List of power core Enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

Professions

List of AI professions.
Adding new entries will NOT result in anything since each entry has to be hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

Propulsion

List of Propulsion Enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

QuestItems

List of quest items. Referenced primarily through scripts.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
DescriptLineText line from Texts\descriptions.txt (line counting starts from 0!)
FileSmallPath to file that contains the small icon
XIcon texture coordinate
YIcon texture coordinate
WIcon texture coordinate
HIcon texture coordinate
FileBigPath to file that contains the large icon
XIcon texture coordinate
YIcon texture coordinate
WIcon texture coordinate
HIcon texture coordinate

QuestMain

List of main quests.

COLUMNDESCRIPTION
IdUnique Id
MainFlag that shows whether the quest is a parent quest
ParentParent Quest Id from the same database
StartScrQuest start script initialized on accepting mission
EndScrQuest end script initialized on abandoning or failing mission
WaypointWaypoint keyname. Waypoint MUST be placed in GLOBAL space via the World Editor

QuestSide

List of side quests.

COLUMNDESCRIPTION
IdUnique Id
MainFlag that shows whether the quest is a parent quest
ParentParent Quest Id from the same database
StartScrQuest start script initialized on accepting mission
EndScrQuest end script initialized on abandoning or failing mission
WaypointWaypoint keyname. Waypoint MUST be placed in GLOBAL space via the World Editor

RandomMission

List of random mission types.
Adding new entries will NOT result in anything since each entry has to be hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
IconFilePath to file that contains the freelance mission log icon
XIcon texture coordinate
YIcon texture coordinate
WIcon texture coordinate
HIcon texture coordinate

Rank

List of in-game ranks.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
LevelExperience level on which the Rank is gained
BonusIdBonus Id from Base\Bonuses.wdt. No bonus amount colum because Ranks use specific Boolean-only bonuses

Region

List of in-game world regions.
Moddability limited! Some portions are hard-coded and might prevent new additions!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

RndCaptainName

List of random captain names used by the game when captain name is set to keyword RND.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

RndShipName

List of random ship names used by the game when ship name is set to keyword RND.

Name used in the game
COLUMNDESCRIPTION
IdUnique Id
ShipName
FactionFactionId from Base\Faction.wdt

Sectors

List of game world sectors.
Moddability limited! The number of sectors is hard-coded!

COLUMNDESCRIPTION
IdUnique Id
RegionIdRegion Id from Base\Regions.wdt the sector belongs to

Sensors

List of Sensor Enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

Shields

List of Shield generator Enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

ShipClass

List of ship classes.
Moddability limited! Some aspects of this database is hard-coded and full moddability is NOT available!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
RankRank Id from Base\Ranks.wdt that shows minimum Rank needed to purchase and command the ship class

Ships

List of ships.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ShipFile
IconFilePath to file that contains the ship icon used in the World Editor
IconIdTexture icon Id used in the World Editor
PriceDefault price. Actual price is set in the station/planet properties
IconSmallFilePath to file that contains the ship small icon
IconXIcon texture coordinate
IconYIcon texture coordinate
IconWIcon texture coordinate
IconHIcon texture coordinate
SchemTPath to top-down ship schematic image
SchemLPath to isometric ship schematic image
SchemQPath to quick target scan ship schematic image

ShipSystemType

List of ship system types used for filtering in the game and World editor.
Moddability limited! Adding new entries will NOT result in anything since the entries are hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameShip system type name used in the game
BaseIdShip system database Id from Base\Base.wdb
IconFileColumn Id (BaseId) that contains the icon texture file path
IconColumnColumn Id (BaseId) that contains the icon Id on texture (IconFile)
PriceColumnColumn Id (BaseId) that contains ship system default price. Actual price is set in the station/planet properties
NameColumnColumn Id (BaseId) that contains ship system name

Shockwave

List of shockwave textures used via scripts.

Texture = path to shockwave texture file

Shockwave: { Texture: Spg2\Textures\Effects\ShockWave_0.dds }

SkillClasses

List of character classes.
Moddability limited! Skill classes are hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

SkillModifiers

List of skill modifiers.
Moddability limited! The number of skill modifiers is hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
SkillSkill Id from Base\Skills.wdt the modifier is linked to
BonusIdBonus Id from Base\Bonuses.wdt
Lvl1Bonus amount gained on level 1. Be careful to use the appropriate variable type!
Lvl2Bonus amount gained on level 2. Be careful to use the appropriate variable type!
Lvl3Bonus amount gained on level 3. Be careful to use the appropriate variable type!
Lvl4Bonus amount gained on level 4. Be careful to use the appropriate variable type!
Lvl5Bonus amount gained on level 5 and all subsequent levels. Be careful to use the appropriate variable type!

Skills

List of character skills.
Moddability limited! The number of skills is hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ClassClass Id from Base\SkillClasses.wdt the skill is linked to
PicLargePath to file that contains the large icon
X1Icon texture coordinate
Y1Icon texture coordinate
X2Icon texture coordinate
Y2Icon texture coordinate
PicSmallPath to file that contains the small icon used on the skills quickbar
X1Icon texture coordinate
Y1Icon texture coordinate
X2Icon texture coordinate
Y2Icon texture coordinate
DescriptLineText line from Texts\descriptions.txt (line counting starts from 0!)
IconSmallFilePath to file that contains the smallest skill icon
IconXIcon texture coordinate
IconYIcon texture coordinate
IconWIcon texture coordinate
IconHIcon texture coordinate
DurationBase skill max duration
CooldownBase skill cooldown time
ScriptPath to activation visual effect script
SoundSound effect fired off on skill activation

Sound

List of sounds used in the game.

COLUMNDESCRIPTION
IdUnique Id
TypeSound type from Base\SoundType.wdt
NameName used in the game
FilePath to sound file (*.wav)
LoopFlag that shows whether the sound should loop or not
MaxBuffersMax number of this same sound heard at the same time
DisMinMinimum distance at which the sound is heard
DistMaxMaximum distance at which the sound is heard

SoundType

List of sound types.
Moddability limited! Some aspects are hard-coded!

COLUMNDESCRIPTION
IdUnique Id
TypeDescriptive sound type name. Actual functionality is hard-coded

Stations

DEPRECATED!

COLUMNDESCRIPTION
IdUnique Id
TypeDEPRECATED

Statistics

List of statistics monitored by the game.
Moddability limited! Some aspects are hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
SortDEPRECATED

StringTable

DEPRECATED!


StructureSort

List of structure types. In-game functionality depends on structure type.
Moddability limited! Some aspects are hard-coded!

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game

Transporter

List of Transporter Enhancements.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the game
ManufacturerFactionId from Base\Faction.wdt
PriceDefault price. Actual price is set in the station/planet properties
Affects x4Bonus Id from Base\Bonuses.wdt (use 0 | 0 pair if no bonus is applied)
Modifier x4Amount applied to the bonus of the pair. Be careful to use appropriate variable type ( 0=Integer | 1=Float | Set to 0 if type is Boolean )
IconFilePath to the file that contains the icon
IconIdId of the icon in the file. Counting starts from 0, slot by slot

Triggers

List of triggers. Used only as helper-tool in the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the World editor
RedRed color channel
GreenGreen color channel
BlueBlue color channel

Turrets

List of turrets referenced in the Light Weapons database as the turret model to be used by the weapon.

COLUMNDESCRIPTION
IdUnique Id
AssemblyPath to assmebly file that contains the turret models
SortNumber of joints the turret has. Important for the game to know how to rotate the turret

TutorialSprites

Database referenced by tutorial panels.
Moddability limited! Adding new entries will NOT actually do anything since in-game functionality is hard-coded.

COLUMNDESCRIPTION
IdUnique Id
SprXY x 15Marker coordinates on panel (starting from 0-0 coordinates of the tutorial panel)

TutorialsText

Database referenced by tutorial panels.
Moddability limited! Adding new entries will NOT actually do anything since in-game functionality is hard-coded.

COLUMNDESCRIPTION
IdUnique Id
TitleTitle text line id from Texts\Misc.txt (line counting starts from 0!)
Desc x15Text line id from Texts\Misc.txt (line counting starts from 0!)

Waypoints

List of waypoints. Differentiated only as helper objects in the World Editor.

COLUMNDESCRIPTION
IdUnique Id
NameName used in the World editor
RedRed color channel
GreenGreen color channel
BlueBlue color channel

For explanation on enhancement tables look in the Assembly Editor/Enhancements section


ACCESSING THROUGH SCRIPTS

Data stored in a table can be accessed via scripts. To do that use the function explained below.

Goal is to get price of the Tesla weapon from the LightWeapons table.

	int weaponId = 0 ;
	int column = 3 ;
	float price = base LightWeapons weaponId column ;
	

GAME ENGINE

IC_Base class handles database interaction in the game engine. Here's a list of important functions:

  • int GetRowMax(WORD TableID); returns the number of rows in a table TableID
  • wChar* QueryFieldString(WORD TableID, WORD Id, WORD x); returns a string from table TableID, row Id, column x
  • int QueryFieldInt(WORD TableID, WORD Id, WORD x); returns integer from table TableID, row Id, column x
  • float QueryFieldFloat(WORD TableID, WORD Id, WORD x); returns float from table TableID, row Id, column x
  • int GetFieldId(int TableID, int x, wChar* CellText); returns row number from table TableID where CellText is in column x

Modifying original game files directly in their default folders is NOT RECOMMENDED!