VGA-planets Turn 3.X format

This document contains the data-structure of a VGA-planets turn-file version 3.x. I don't know about earlier versions, these are probably simpler. These specifications are non-WinPlan.

Guarantee

No guarantee whatsoever is given about these specifications; I can't be 100% sure that what I'm writing here is complete. It is, however, correct in all cases I have seen.

Important numbers

Tim Wisseman has written VGA-planets in Basic. Therefor, the first byte of any file or any count is 1. In C this is 0. A long is 4 bytes and a short 2.

Specifications

Any turn is built up according to the following structure:
  1. playernumber (short)
  2. number of commands (long)
  3. timestamp (18 bytes)
  4. 2 bytes (meaning unknown)
  5. host-id (short; see result-format or GEN??.DAT-format)
  6. when there are commands, one byte (meaning unknown)
  7. the commands
  8. checksum over all previous (long; timestamp counts 4 times)
  9. 4 bytes (meaning unknown)
  10. your registration (204 bytes)
  11. 11 checksums, for each race (longs)

Commands

Each of the following items is the command number, followed by a description of that command and between square brackets the items the command is made from. The last number is the total length (in bytes) of that command. Most items are shorts (on planet more longs).
  1. Friendly code of a ship [shipid;FC] 7
  2. Warp of a ship [shipid;warp] 6
  3. Waypoint of a ship [shipid;dx;dy] 8
  4. Mission of a ship [shipid;mission] 6
  5. Primary enemy of a ship [shipid;enemy] 6
  6. Tow target of a ship [shipid;towtarget] 6
  7. Name of a ship [shipid;name] 24
  8. Transfer to another planet [shipid;neutr;trit;dur;molyb;clans;supp;planetid] 18
  9. Transfer to another ship [shipid;neutr;trit;dur;molyb;clans;supp;secondshipid] 18
  10. Intercepttarget of a ship [shipid;intercepttarget] 6
  11. Amount of fuel of a ship [shipid;neutr] 6
  12. Amount of tritanium of a ship [shipid;trit] 6
  13. Amount of duranium of a ship [shipid;dur] 6
  14. Amount of molybdenium of a ship [shipid;molyb] 6
  15. Amount of supplies of a ship [shipid;supplies] 6
  16. Amount of clans of a ship [shipid;clans] 6
  17. Amount of torpedoes of a ship [shipid;torps] 6
  18. Amount of MegaCredits of a ship [shipid;MC] 6
  19. Friendly code of a planet [planetid;FC] 7
  20. Mines on a planet [planetid;mines] 6
  21. Factories on a planet [planetid;factories] 6
  22. Defense on a planet [planetid;defense] 6
  23. Neutronium of a planet [planetid;neutr] 8
  24. Tritanium of a planet [planetid;trit] 8
  25. Duranium of a planet [planetid;dur] 8
  26. Molybdenium of a planet [planetid;molyb] 8
  27. Colonists of a planet [planetid;clans] 8
  28. Supplies of a planet [planetid;suppl] 8
  29. MegaCredits of a planet [planetid;MC] 8
  30. Colonist tax of a planet [planetid;coltax] 6
  31. Natives tax of a planet [planetid;nattax] 6
  32. Build a base on a planet [planetid;boolean] 4
  33. Defense of a base [baseid;defense] 6
  34. Engine tech level of a base [baseid;enginetech] 6
  35. Hull tech level of a base [baseid;hulltech] 6
  36. Beam tech level of a base [baseid;beamtech] 6
  37. Amounts of engines on a base [baseid;9_amounts] 22
  38. Amounts of hulls on a base [baseid;20_amounts] 44
  39. Amounts of beamweapons on a base [baseid;10_amounts] 24
  40. Amounts of torplaunchers on a base [baseid;10_amounts] 24
  41. Amounts of torpedoes on a base [baseid;10_amounts] 24
  42. Number of fighters on a base [baseid;fighters] 6
  43. Target ship of Fix/Recycle [baseid;shipid] 6
  44. Fix or Recycle command [baseid;fixrec] 6
  45. Base mission [baseid;mission] 6
  46. Build ship on a base [baseid;hull;engine;beamtype;#beams;torptype;#launchers;0] 18
  47. Torp tech level of a base [baseid;torptech] 6
  48. Encoded message [length;from;to;message] 8+length
  49. New encoded password [0;pwd] 14
    This page has been made by Kero van Gelder.
    Last update 15th of January 1997