All of the files that make up a custom ship design must be placed in a subdirectory of the Mods\Ships directory that bears the name of the ship design. For example, to create a new destroyer class of starships called the "Warrior", start by creating a directory named Mods\Ships\Warrior. All models, texture bitmaps, and other data files for the Warrior must be placed in this directory.

The properties for your ship design are defined in a text file called a "Ship Definition File". This file can be created with any text editor (e.g. notepad) and must have the same name as the ship design. For our Warrior example, the ship definition file would be Mods\Ships\Warrior\Warrior.def. The ship definition file contains all of the physical properties of the ship (mass, hull strength, turn rate, lift, drag, etc.) and also names the 3D mesh files that define what the ship looks like.

All physical objects in Starshatter are modeled using 3D mesh files created by the low-poly editor Magic, written especially for the game. Magic stores meshes in files with .mag extensions. You can use Magic to create ship designs from scratch, or you can import existing designs created in another 3D modeling tool (3DStudio, LightWave, Maya, Milkshape). Magic uses the popular Wavefront OBJ ASCII format for importing geometry from 3rd party modeling tools. You can download a free, unsupported copy of Magic 1.1 from the Downloads Page of the official website.

Texture maps for your ship design must be stored in PCX format. Textures must be square powers of two (e.g. 64x64 or 256x56) in size. You should store your textures in 24 bit RGB format. You can use Adobe Photoshop, JASC Paint Shop Pro, or any other bitmap graphics editor to create textures for your models.


Ship Definition File

The ship definition file is a text file that has a .def extension. All definition files in Starshatter use the same C-like syntax. The ship definition file defines the logical, graphical, physical, and functional properties of a class of ships.


Logical Properties
name The name of the ship design. This is the same name as the directory in which this file is stored.
display_name The name of the ship design as it should be displayed on the HUD in the game itself. This parameter is optional. If no display_name is specified, the design name will be used.
abrv The name of the ship type abbreviation as it should be displayed on the HUD in the game itself (e.g. "F-15E"). This parameter is optional. If no abrv is specified, no abbreviation will be used.
class The displacement class of the ship. See below for a list of valid class names.
map A structure containing a list of sprite file names to be used in rendering this ship design in the navigation map.
beauty The name of the beauty shot bitmap file for this ship. This image is used to represent the ship in pre-mission briefing screens. If this attribute is not specified, the default is "beauty.pcx".
hud_icon The name of the HUD icon bitmap file for this ship. This image is used to represent damage to the ship at the bottom of the HUD. If this attribute is not specified, the default is "hud_icon.pcx".

EXAMPLES:

name:         Orion
display_name: Orion
class:        carrier
beauty:       "beauty.pcx"
hud_icon:     "hud_icon.pcx"

map: {
   sprite: "map0.pcx",  //  9 oclock
   sprite: "map1.pcx",  // 10 oclock
   sprite: "map2.pcx",  // 12 oclock
   sprite: "map3.pcx",  //  2 oclock
   sprite: "map4.pcx",  //  3 oclock
   sprite: "map5.pcx",  //  4 oclock
   sprite: "map6.pcx",  //  6 oclock
   sprite: "map7.pcx"   //  8 oclock
}

VALID SHIP CLASSES

Fighters and Shuttles:
  • Fighter
  • Attack
  • LCA
Starships:
  • Freighter
  • Frigate
  • Destroyer
  • Cruiser
  • Carrier
Space Stations:
  • Station
Ground Units:
  • Building
  • Factory
  • SAM
  • EWR
  • C3I
  • Starbase

Graphical Properties
model The name of the 3D low-poly mesh file for a single level of detail ship.
detail_n The name of the 3D low-poly mesh file for one level of detail in a multi-LOD ship. The n can be 0, 1, 2, or 3 from lowest detail to highest detail.
feature_n The characteristic feature size in model units for one level of detail in a multi-LOD ship. The n can be 0, 1, 2, or 3 from lowest detail to highest detail.

NOTE: Feature size is not a measure of distance from the camera to the model. The feature size indicates how large the visible details are for each LOD mesh. The highest detail mesh should have the smallest feature size, and the lowest detail mesh should have the largest feature size.
spin The 3D rate of spin in radians per second for one mesh component file. There must be exactly as many spin attributes as there are models per level of detail. For example, if a ship has three levels of detail, and each level has two meshes (one spinning one stationary) then there must be exactly two spin attributes in the definition.

EXAMPLES:

// THREE LOD MESHES:

// big features
detail_0:   "low-detail.mag"
feature_0:  1000

// medium grain features
detail_1:   "medium-detail.mag"
feature_1:  100

// fine detail
detail_2:   "high-detail.mag"
feature_2:  10

// ONE STATIONARY AND TWO ROTATING SECTIONS, ONE LOD:

model:      "s2.mag"
model:      "s2mid.mag"
model:      "s2end.mag"

spin:       (0.0, 0.00, 0.0)
spin:       (0.0,-0.10, 0.0)
spin:       (0.0, 0.07, 0.0)

Physical Properties
mass The mass of the ship in metric tonnes.
integrity Hull strength in "hit points". If the integrity of the ship reaches zero, the ship is destroyed.
agility A general rating of the ship's ability to turn. Smaller numbers mean the ship turns more slowly, larger numbers mean that it turns more rapidly.
vlimit The exhaust velocity of the main drive in meters per second. Beyond this velocity, the ship will accelerate much more slowly.
roll_rate Similar to agility, but just sets the rate at which the ship rolls about its long axis.
scale A number used to multiply the vertex coordinates in the mesh when rendering the ship in the game engine.
acs Active Sensor Cross-section. A number that indicates how visible this ship is to active sensors. Similar to radar cross section in the real world.
trans_x Strength of the lateral (side-to-side) thrusters. Helps control how rapidly the ship can turn.
trans_y Strength of the longitudinal (foreward/aft) thrusters. Helps control how rapidly the ship can slow down.
trans_z Strength of the spinal/ventral (top/bottom) thrusters. Helps control how rapidly the ship can turn.
roll_drag How quickly the ship stops rolling after you let go of the stick.
pitch_drag How quickly the ship stops pitching after you let go of the stick.
yaw_drag How quickly the ship stops turning (yawing) after you let go of the stick.
drag Body drag coefficient. Used to calculate drag in flight regimes that have drag (e.g. atmosphere, arcade space mode).
CL Coefficient of Lift. Realistic flight model, atmospheric only.
CD Coefficient of Drag (Wings). Realistic flight model, atmospheric only.
stall Stall onset angle of attack (radians). Realistic flight model, atmospheric only.
bridge Vector location of bridge camera (F1 View) in model coordinates.
chase Vector location of chase camera (F2 View) in model coordinates.

EXAMPLES:

mass:       517e3
agility:    2
vlimit:     220
roll_rate:  7
integrity:  75e3
scale:      5
acs:        1.5

trans_x:    1e6
trans_y:    5e5
trans_z:    1e6

drag:       1e-7
roll_drag:  1.2
pitch_drag: 1.2
yaw_drag:   1.2

chase:      (0, -1800, 170)
bridge:     (0,   600, 100)