SHIPx.DIS - Old Ship data [V]

 +0     WORD    Number of ships
 +2   n BYTEs   Records of 107 bytes each
 +m  10 BYTEs   SHIPx.DAT: Signature 2 -> GENx.DAT
                SHIPx.DIS: Signature 1
A ship record:
 +0     WORD    Ship Id
 +2     WORD    Player Id (1..11, or zero in SHIP.HST for free ship slots)
 +4   3 BYTEs   Friendly Code. THost permits ASCII codes 32 to 122.
 +7     WORD    Warp factor (0..9)
                Sometimes this field is set to a negative value by the
                host, if the ship has more than 100% damage (due to blindly
                applying the max-speed-for-damaged-ship formula).
 +9     WORD    X distance to waypoint (destination-X minus X-position)
+11     WORD    Y distance to waypoint (destination-Y minus Y-position)
                The distances must be in range -3000 .. +3000
+13     WORD    X position
+15     WORD    Y position
                Usually between 1 and 4000 or 1 and 10000. Ships with (X,Y)
                = (0,0) should not appear, as this makes problems with the
                SHIPXYx.DAT file and probably many clients.
+17     WORD    Engine type (1..9, index into ENGSPEC.DAT)
+19     WORD    Hull type (1..105, index into HULLSPEC.DAT)
+21     WORD    Beam weapon type (0 for none, or 1..10 = index into
                BEAMSPEC.DAT). See note below.
+23     WORD    Number of beams
+25     WORD    Number of fighter bays (if not zero, the T-Launcher type
                and T-Launcher number values are ignored/set to 0, since a
                ship can never have Torpedoes and Fighters)
+27     WORD    Torpedo Launcher Type (0 for none, 1..10 as index into
                TORPSPEC.DAT). See note below.
+29     WORD    Number of Torpedoes/Fighters
+31     WORD    Number of Torpedo launchers
+33     WORD    Mission. See below.
+35     WORD    Primary Enemy (0 or race Id 1..11)
+37     WORD    Id of ship to tow, or first mission argument
+39     WORD    Damage % (0..149)
+41     WORD    Crew
+43     WORD    Colonist Clans
+45  20 BYTEs   Name
+65     WORD    Neutronium
+67     WORD    Tritanium
+69     WORD    Duranium
+71     WORD    Molybdenum
+73     WORD    Supplies
+75   7 WORDs   Unload Cargo to planet
                +75     WORD    Neutronium
                +77     WORD    Tritanium
                +79     WORD    Duranium
                +81     WORD    Molybdenum
                +83     WORD    Colonists
                +85     WORD    Supplies
                +87     WORD    Planet Id or 0 for Jettison
                (see text below!)
+89   7 WORDs   Transfer to enemy ship
                +89     WORD    Neutronium
                +91     WORD    Tritanium
                +93     WORD    Duranium
                +95     WORD    Molybdenum
                +97     WORD    Colonists
                +99     WORD    Supplies
                +101    WORD    Ship Id or 0
                (see text below!)
+103    WORD    Id number for intercept mission or second mission argument.
                In THost, this field must contain a valid ship Id or zero,
                even if 3rd-party missions are used.
+105    WORD    Money (0..10000)

Weapons

Like for build orders (BDATAx.DAT), beam type and beam count should be either both zero (meaning no weapon) or both non-zero. The same holds for torpedo launcher types and counts.

Some programs (Dominate, I suppose), generate ships with a zero count, but a non-zero type (e.g., a freighter with 0 Mark 8 launchers). So you must check both fields to tell if a ship has weapons or not. The usual hosts and clients handle this correctly (if "correctly" means that they don't crash or do something unexpected). The bad thing about this problem is that it can not really be corrected from client-side. You can sweep it under the carpet by hacking the SHIPx.DAT/.DIS files during unpack, though, which is what PCC does. PHost 3.3 corrects this at host side.

Cargo Transfers / Ship Mass / Jettison

The ship mass is computed as the sum of the masses of all components of the ship (hull, weapons), ammunition, and cargo (fields at +43 to +73). Unload/Ship transporters do not contribute to the ship mass.

Note that, however, PLANETS.EXE counts transporter contents toward the ship's cargo hold. That is, if a SDSF transfers 70 kt of something to an enemy ship, it is reported as fully-loaded by PLANETS.EXE although it has nothing in its cargo hold. Host 3.22.030 enforces this limit (earlier ones do not). Common 3rd-party clients (VPA, PCC) allow overloading the ship this way, as do earlier Hosts and PHost. Since 3.22.036, this restriction is host-configurable ("VPA extra features"), and Winplan also allows overloading.

When transferring cargo, you remove the cargo from the ship's own cargo hold by subtracting, and load it onto the target ship/planet or onto the transporter by adding it.

When transferring stuff to an own ship, PLANETS.EXE often generates a dummy transfer (Id set, but all amounts are zero). These transfer orders should not be sent to the host, and can (should!) be canceled.

When in deep space, ships can jettison cargo; this is a normal ship-to- foreign-planet transfer with the target planet set to zero. Most clients implement it this way. When the ship has no fuel, the transfer fails and the cargo is put back onto the ship.

Winplan implements jettison by just subtracting the cargo from the ship's cargo hold, bypassing the transporter. This way, it can even jettison ammo and money. One can still tell how much was dropped by summing up everything of that cargo type at the particular place, and seeing how much is missing from the beginning of the turn (PCC implements such an algorithm for torps/fighters). Winplan does require the ship to have fuel to allow this, though, so the effective rules remain the same. PHost until 3.4g/4.0d supports this type of jettison only for Winplan-style TRNs, others (including Winplan shareware users!) will get a yellow status and PHost will undo the action.

Missions

THost reserves the mission numbers 0..19 for its own use and allows usage of missions 20..999 for add-on programs. THost requires the unused mission arguments (Tow, Intercept) to be zero if a standard mission other than Tow/Intercept is used. It also imposes some limits on the arguments for add-on missions: the intercept argument must be a valid ship Id number or zero. If these constraints are violated, arguments are cleared or missions are not performed.

PHost uses missions 20 and up for extended missions (defaults, the base number can be changed). PHost (up to 3.3b) requires the mission arguments to be in the range zero to 500, even if the mission would allow more (e.g., beam transfer money): larger values are flagged as Yellow status when processing the turn, and are set to 250. Values outside this range can be set with 'extmission' commands. Newer PHost versions allow the full range 0..10000 for mission arguments.

The interface to enter extended (i.e. code >= 20) missions in Winplan is known as M.I.T. (Mission/Intercept/Tow) and can be configured with MISSION.INI.

  Standard Missions:
    0   none
    1   THost/PHost: Explore.
        SRace: that what is mission 9 in "normal" hosts.
    2   Mine sweep
    3   Lay mines
    4   Kill
    5   Sensor Sweep
    6   Colonize, Land & Disassemble
    7   Tow, Tow argument = ship Id which must be at the same place as the
        towing ship.
    8   Intercept, Intercept argument = ship to intercept. Must be visible
        and within 200 ly since Host 3.22.015.
    9   Race specific missions
          1 = Federation        Super Refit
          2 = Lizard            Hisssss!
          3 = Bird Man          Super Spy
          4 = Fascist           Pillage Planet
          5 = Privateer         Rob Ship
          6 = Cyborg            Self Repair
          7 = Crystal           Lay Web Mines
          8 = Evil Empire       Dark Sense
          9 = Robots            Build Fighters
         10 = Rebel             Rebel Ground Attack
         11 = Colonies          Build Fighters
   10   Cloak. Only possible on appropriate ships since Host 3.22.010.
   11   Beam up fuel
   12   Beam up Duranium
   13   Beam up Tritanium
   14   Beam up Molybdenum
   15   Beam up Supplies
   16..19 reserved
  --- PHost only ---
   20   Make Torpedoes (like "mkt")
   21   Lay Minefield, Intercept = number of torpedoes to use (0=all), Tow
        = identity of minefield owner (0=self, other=player Id)
   22   Lay Web Minefield (Crystals only, parameters as for mission 21)
   23   Scoop Torpedoes from Minefield (like "msc"). Intercept = max.
        number of torpedoes to make (0=as many as possible)
   24   Load Minerals and make Torpedoes (like "lfm" for fighters).
        Intercept argument like for mission 23.
   25   Beam Down Money (like "bdm"). Intercept = amount (0=all)
   26   Transfer Torpedoes to ship (like "btt"). Intercept = Ship Id (other
        player, same location), Tow = Number of torpedoes (0=max)
   27   Transfer Fighters to ship (like "btf", Parameter as for mission 26)
   28   Transfer Money to ship (like "btm", Parameter as for mission 26)
   29   Standard Super Spy.
   30   Cloak. Like mission 10, if the client program does not allow that
   31   Extended Mission. Like mission 9.
   32   Gather-build fighters (like "lfm", Robot/Rebel/Colonies only).
        Intercept = amount (0=max)
   33   Beam up credits (like "bum"). Intercept = amount (0=max)
   34   Beam up clans. Intercept = amount (0=max)
   35   Beam up multiple. Requires command message.
   36   Add Mines to Field. Intercept = amount of torpedoes (0=all), Tow
        = mine field Id (0=first appropriate)
   37   Add Web Mines to Field. Parameters as for mission 36.
   38   [PHost 4.0+] Training. Intercept = supplies to use
   39   [PHost 4.0i+] Exchange Crew. Intercept = ship Id, Tow = crew
   40   [PHost 4.0i+] Repair ship. Intercept = ship Id
  --- Add-on Missions ---
  200 .. 228    FHost missions
  666 .. 680    QVS missions
   800          Starbeamer