[Posting] TRN BaseBuildShip with zero values
From:James T. Plagerism
Thread:TRN BaseBuildShip with zero values
Forum:Planets
Date:Fri, 2020-07-10 21:47 GMT

Can someone who is familiar with the details of TRN file format explain what a Code 53 (35h=BaseBuildShip) command means if everything other than Base ID is set to zero?

Quoting from Stefan's File Format List:

--- Code 53 (35h=BaseBuildShip) ---
 +0     WORD    Base Id
 +2     WORD    Hull Number
 +4     WORD    Engine
 +6     WORD    Beam Weapon Type
 +8     WORD    Beam Weapon Count
+10     WORD    Torpedo Type
+12     WORD    Torpedo Count
+14     WORD    Set to zero. See BDATAx.DAT for more info.

  A well-known Winplan bug (now fixed) is that its built-in MAKETURN
  did not generate this command if the build order _changed_; instead it
  generated it if it was _present_. This prevented users from canceling
  a build order after the ship limit.

  PHost has a workaround for this, which you should be aware of when
  generating Winplan TRNs: if it receives a Winplan TRN, the BaseBuildShip
  command specifies the current build order for the starbase. If there is
  no such command for a particular starbase, the base's build order is
  canceled. So you must send this command for all bases with either
  changed or present build orders to generate TRNs suitable for both THost
  and PHost.

I came across a trn file (I suspect from Winplan, perhaps?) that has one such command (it happens to be the last command in the TRN if that's relevant) that has baseID set, but the other components are all zero. What does this mean?