home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / ibm / pc / games / 22020 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  6.8 KB

  1. Path: sparky!uunet!ssiny!gnohmon
  2. From: gnohmon@ssiny.UUCP (Ralph Betza)
  3. Newsgroups: comp.sys.ibm.pc.games
  4. Subject: CIV save files new info
  5. Keywords: CIV save files
  6. Message-ID: <154@ssiny.UUCP>
  7. Date: 16 Nov 92 17:56:50 GMT
  8. Distribution: world
  9. Lines: 159
  10.  
  11. Here is my contribution to CIV save-file decoding.
  12. I have added several important fields;
  13. city.TradeRoutes is tested; so are unit.CityNumber and the unit
  14. veteran status bit.
  15.  
  16.  
  17.         /* char  = 1 byte */
  18.         /* short = 2 bytes */
  19.         /* int   = 4 bytes */
  20.  
  21. 1508-2307 (128 x 28 = City Info)
  22. ** The index into this array is a one-byte CityNumber.
  23. ** CityNumber 0xff is invalid, == NONE
  24.  
  25.                 struct {
  26. 0                        unsigned short possessions; /* yes */
  27. 2                        char unknown1;
  28. 3                        char unknown2;
  29. 4                        char latitude;
  30. 5                        char longitude;
  31. 6                        char unknown3;
  32. 7                        char population;
  33. 8                        char unknown4;
  34. 9                        char current_project;
  35. a                        char trade;
  36.     ** needed for other city to calculate trade route value quickly
  37. b                        char ownerNumber;
  38. c                        short storedFood;
  39. e                        short current_shields_saved_up;
  40. 10                       char CitySquares[3];
  41.     ??? bitmap of squares the city has under production???
  42. 13                       char unknown5[3];
  43. 16                       char CityNameIndex;
  44.     ** Rome 0x10, Paris 0x90
  45. 17                       char TradeRoutes[5];
  46.     ** CityNumber index to city with which trade route exists
  47.     ** possibly TradeRoutes[3], unknown7[2];
  48.     ** Most cheats are so powerful they spoil the game.
  49.     **     Magic trade routes are more subtle...
  50.                 }
  51.  
  52. 2308-26bf Unit definitions
  53.                 struct {
  54.                         char name[12];
  55. 0                        short  ObsolescenceLevel;
  56.     tech level at which it becomes obsolete and is no longer offered
  57.     on the city production menu
  58. 2                        short  travel_mode; /* 0 - land, 2 - sea, 1 - air */
  59. 4                        short  movement_per_turn;
  60. 6                        short  turns_of_movement_for_air_travel;
  61. 8                        short  offense;
  62. a                        short  defense;
  63. c                        short  cost; /* x10 shields to produce */
  64. e                        short  unknown; /* vision distance NOT */
  65.     ** Cruiser Battleship Submarine Carrier == 0300
  66.     ** Fighter Bomber == 0200
  67.     ** all others == 0000
  68.     ** It is surprising  that diplomat caravan nuclear are == 00
  69. 10                        short  transport_amount;
  70. 12                        short  Purpose; /* 0 expansion
  71.                                           1 ground offensive
  72.                                           2 ground defensive
  73.                                           3 sea offensive
  74.                                           4 air defensive
  75.                                           5 sea transportation
  76.                                           6 other
  77.       the computer's AI uses this...      */
  78. 14                        short  tech_level_available_at;
  79.                 }
  80.  
  81. 26c0-2cbf Red #0 Unit information (12 x 128 = 1536 bytes)
  82.                 struct {
  83. 0                        char flags1;
  84.     0x20 veteran
  85. 1                        char latitude;
  86. 2                        char longitude;
  87.     It's sensible to make new units in your first city.
  88.     Random locations might be good for exploring.
  89. 3                        char unit_type; ff == no unit
  90. 4                        char movement_remaining; /* times three */
  91. 5                        char flags2;
  92.     0x01 only value seen; for a settler
  93. 6                        char unknown1;
  94.     ( 6 and 7 == destination. Used mostly for computer pieces. )
  95. 7                        char unknown2;
  96. 8                        char flags3;
  97.     ** possibly this is the number of turns remaining for a settler
  98.     ** operation.
  99. 9                        char flags4;
  100.     0x02 == sentry
  101.     0x08 == cannot move; on sentry, or settler finished operation
  102.     02, 10, 80, 40, 08, 00 observed; 00 is normal
  103. a                        char unknown; /* pointer to next unit ??? */
  104.     ** Seems to be meaningless for *your* units
  105. b                        char CityNumber;  0xff == NONE
  106.     index into "1508-2307 (128 x 28 = City Info)"
  107.     This is the city it belongs to.
  108.     Making all your units belong to NONE under democracy is quite
  109.     unfair. :-)
  110.                 }
  111.  
  112. 6. TECHNOLOGY MASK  (10 bytes/Civilization - Start at 0x4e8)
  113.  
  114. Tech level is a shift count
  115.  
  116. 0100-0000-0000-0000-0000    Masonry ? Code of Laws ? ( level 0 )
  117. 0200-0000-0000-0000-0000    Alphabet ( level 1 )
  118. 0400-0000-0000-0000-0000    Currency ? ( level 2 )
  119. 8000-0000-0000-0000-0000    Mapmaking ( level 7 )
  120. 0001-0000-0000-0000-0000    Navigation ( level 8 )
  121. 0002-0000-0000-0000-0000    Mathematics ( level 9 )
  122. 0040-0000-0000-0000-0000    ? ( level e ) Frigate
  123. 0000-0100-0000-0000-0000    Masonry ? Code of Laws ? ( level 10 )
  124. 0000-0200-0000-0000-0000    Bronze Working ( level 11 )
  125. 0000-0400-0000-0000-0000    Iron Working ( level 12 )
  126. 0000-4000-0000-0000-0000    Writing ( level 16 )
  127. 0000-8000-0000-0000-0000    ? ( level 17 ) Ironclad
  128. 0000-0001-0000-0000-0000    Trade ( level 18 )
  129. 0000-0002-0000-0000-0000    Ceremonial Burial ( level 19 )
  130. 0000-0080-0000-0000-0000    Horseback Riding *A* ( tech level 1f )
  131. 0000-0000-0100-0000-0000    Gunpowder ( level 20 )
  132. 0000-0000-0200-0000-0000    The Wheel ( level 21 )
  133. 0000-0000-0800-0000-0000    ? ( level 23 ) Transport
  134. 0000-0000-2000-0000-0000    ? ( level 25 ) Cruiser
  135. 0000-0000-4000-0000-0000    Flight ( level 26 )
  136. 0000-0000-8000-0000-0000    Advanced Flight ( level 27 )
  137. 0000-0000-0002-0000-0000    ? ( level 29 ) Submarine
  138. 0000-0000-0004-0000-0000    Pottery ( level 2a )
  139. 0000-0000-0040-0000-0000    ? ( level 2e ) Nuclear
  140. 0000-0000-0000-0100-0000    Metallurgy ( level 30 )
  141. 0000-0000-0000-1000-0000    ? ( level 34 ) Battleship
  142. 0000-0000-0000-0004-0000    Automobile ( level 3a )
  143. 0000-0000-0000-0040-0000    Chivalry ( level 3e )
  144. 0000-0000-0000-0080-0000    Robotics ( level 3f )
  145. 0000-0000-0000-0000-0100    Conscription ( level 40 )
  146. 0000-0000-0000-0000-0200    ? ( level 40 ) Mech. Infantry
  147.  
  148. *A* level 1f is not 0000-8000-0 because of Intel byte order
  149.  
  150. 0190-01c7 White (player 1) Unit Count (2/unit * 28 unit types)
  151. ** this is used by the military advisor, you don't have to update it
  152. ** if you give self extra units.
  153.  
  154. 04d8-04d9 Red (player 0) Technology Count (????)
  155. ** this is used for scoring, and to determine how much the next
  156. ** advance costs.
  157.  
  158. 000a-000b Difficulty Level (1-4)
  159. ** Difficulty level 1024 is impossible!!!, but it works...
  160.  
  161. 5. UNIT/production TYPES
  162. d8  - Women's Suffrage
  163.  
  164.  
  165. ----Ralph Betza (FM),
  166.     uunet!ssiny!gnohmon
  167.  
  168. "The question of whether a computer can swim is more interesting
  169.  than the question of whether a submarine can think" - Lenny Dykstra
  170.