home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / MISSING / CIVMAP21.ZIP / civmap21.inf < prev    next >
Text File  |  1993-06-22  |  11KB  |  233 lines

  1.  
  2. The Sirius Cybernetics Corporation proudly presents:
  3.  
  4. The program the world has urgently waited for:
  5.  
  6. (fanfare on)
  7.  
  8. *************************************************
  9. *  The unique and true Civilization Map Editor *
  10. *************************************************
  11.  
  12. (fanfare off)
  13.  
  14. Ok., ok., I am starting to overstate a very little bit. And if you suspect
  15. a decryptation of the .map file, I must disappoint you. But I was able to
  16. write a little program, by which you can change the map directly while
  17. playing the game. Here is the table of contents of this civmap21.inf file:
  18.  
  19. - Some information of civmap21.exe
  20. - How to install civmap21.exe
  21. - What I could find out of civ.exe
  22.  
  23. If you like the program (or not) or if you want to get rid of something else
  24. like wishes of improvement, send a mail to
  25.  
  26.    Holger.Eichmann@cdc2.atomare-prozesse.physik.uni-hannover.dbp.de
  27.    
  28.    (wow, that's an email address: 64 characters)
  29.  
  30. Please send flames directly to the Sirius Cybernetics Corporation at Sirius
  31. Star System, Planet I-III or to
  32.  
  33.    department_of_complaints@scc.sirius_system.ump.un
  34.  
  35.  
  36. - Some informations of civmap21.exe
  37.  
  38.    Because the .map file is crypted so much, that up to now there is no
  39. decrypter, I have explored, whether the map information can be found (and
  40. changed) uncrypted in the memory while playing civilization. And I have
  41. really discovered the places where the information about the type of land-
  42. scape, about the attributes (like roads, pollution) and, whether a field is
  43. known or not, has been stored. The rest was more easy. civmap21.exe changes
  44. the interrupts F1h und F2h. If you change the correct bytes in the civ.exe
  45. file, int F1h will be called every time you try to get informations of a
  46. landscape of a field (click right buttom of your mouse on this field). You
  47. will find yourself in the map changing menu. After leaving it you can
  48. normally continue playing. You can switch on/off the possibility of entering
  49. the editor by pressing the print screen key.
  50.    If you wonder whether I have not found, where the improvements of a field
  51. (like gold, fish, gems, ...) has been stored, you are right. The simple
  52. reason is, there is no such a table in the memory! Civilization only calcu-
  53. lates by a simple algorithmus whether a field is improved or not. Because
  54. I have not been content with this, I have insert the int F2h call after this
  55. calculation. This procedure uses its own list of improvement positions and
  56. changes the improvement state of a field, when its coordinates can be found
  57. in the list. From the cheat menu you can insert or delete map fields in this
  58. list. Up to now the list length is limited to 200 entries. If you want to
  59. increase this value, you have to change the constant in the Turbo Pascal
  60. source and recompile. Because (of course) this list will not be saved, when
  61. you save your game, there is a possibility of saving and restoring this
  62. list, too. Remember that, if you only leave and immediatly reenter civ.exe,
  63. this list will not be cleared and the list will not be loaded automatically,
  64. when you load an old game.
  65.   There is a possibility to save and load the interesting memory parts, which
  66. contains all the data of the map, to disk. If someone doesn't want to change 
  67. the map field by field with my editor, he can change the whole map by editing 
  68. that file. For further informations of the partitions of the saved memory parts 
  69. see the 'What I could find out of civ.exe' part of this file.
  70.    There are some memory areas, which I didn't understand so far (see
  71. below). Some of them looks like a strategy help for the computer. My program
  72. doesn't change these bytes. Therefore I don't know whether the computer will
  73. really react on the map changing correctly.
  74.    In version 2.0 civmap21 is looking for the data positions in memory by
  75. itsself (see the .asm sources). I have tested it with my version 1 and with
  76. the versions 2-5 which you can find at wuarchive.wustl.edu (6/8/93). If you
  77. want to know your version number, you have to start civ.exe. When you are
  78. asked for your graphic card, in the top window you can find a 474 followed by
  79. the version number (e.g. 474.1 for version 1). Also it only runs under a VGA
  80. graphic card. The program is not tested very well, so there might be some
  81. errors inside. If you find one (or more), send me an email.
  82.  
  83.    There are few things, which are known:
  84. *  If you want to improve a place by railroad, you first must build roads.
  85. *  When you edit an unknown field the screen will be dark when you leave the
  86.    editor. The reason is that civ.exe makes no screen refresh, when you right
  87.    click with your mouse on an unknown field (I have only insert my routines
  88.    and haven't changed the normal progress of the program). You can easily
  89.    rebuild the screen by a left click with your mouse.
  90. *  When you make the whole map known, you will not find the armies and towns
  91.    of the enemy. The reason is that there is stored elsewhere which armies
  92.    and towns you know (I don't know where).
  93. *  When you build new land at the border of a continent or connect two conti-
  94.    nents, this will not be recognized by the world wonders. I know where this
  95.    continent belonging is stored (see above), but it is not very easy to
  96.    change it. Perhaps someone else want to do that.
  97. *  I have heard that there are problems with settler build railroads. I could
  98.    not test it up to now.
  99.  
  100.  
  101. - How to install civmap21.exe:
  102.  
  103.    You have to change the following bytes in your civ.exe file (not before
  104. making a security copy of that file !!!!) e.g. by using the norton utili-
  105. ties:
  106.  
  107. Insert int $F1:
  108. version 1 + 2(?): E9 54 00 B8 32 00 -> E9 54 00 CD F1 90
  109. version 3 + 4:    02 75 53 B8 32 00 -> 02 75 53 CD F1 90
  110. version 5:        E9 59 00 B8 32 00 -> E9 59 00 CD F1 90
  111.  
  112. Insert int $F2:
  113. all versions: 3B C1 75 BB B8 01 00 -> CD F2 90 90 90 90 90
  114.  
  115. Now you only have to start civmap21.exe before starting civ.exe (if you
  116. change these bytes you MUST ones start civmap21.exe before civ.exe, because
  117. otherwise the int $F1, $F2 commands will jump into the NIL).
  118.  
  119.  
  120. - What I could find out of civ.exe
  121.  
  122.    Here I want to discribe a couple of things, what I have puzzled out of
  123. civ.exe. In the following I will arbitrarily set the address of the int $F1
  124. call to 1ae5h:0972h by version 1 (1AE6h:0976h, version5). This is my fix-
  125. point to fix the position of the civ.exe file in the memory. The first
  126. command, civ.exe executes, can than be found at 40Eah:0010, version1
  127. (40E5h:0010, version5). When you start it, the program and the data will be
  128. shift in memory relative to these addresses. Remember that the int F1h and
  129. other procedures can only be found at their right place, when you run the
  130. program over the starting setup questions. It looks like the memory parts
  131. are shifted when you use another civ.exe version. I have described in the
  132. .asm sources, how civmap21.exe finds the right memory addresses.
  133.  
  134. *     The map has a size of 80*50. The x coordinate is counted from left to
  135.       right, the y from up to down.
  136. *     The main map data are located at 672Bh:0 (6817h:0). They are devided
  137.       in four blocks, each of 3E80h bytes length. Each block contains map
  138.       row after map row four informations respectively. E.g. it starts:
  139.       000h-04fh: first map row, first parameter
  140.       050h-09fh: first map row, second parameter
  141.       0A0h-0Efh: first map row, third parameter
  142.       0F0h-13fh: first map row, fourth parameter
  143.       140h-18fh: second map row, first parameter
  144.      ...
  145.      Altogether there are 16 parameters stored at most. They are:
  146.  
  147.       First block, first parameter:
  148.       The type of the landscape. It means:
  149.       01 : ocean
  150.       02 : forest
  151.       03 : swamp
  152.       06 : plain
  153.       07 : tundra
  154.       09 : river
  155.       0A : grassland
  156.       0B : jungle
  157.       0C : hill
  158.       0D : mountain
  159.       0E : desert
  160.       0F : arctic
  161.       04, 05, 08 leads to chaos on the screen
  162.  
  163.       First block, second parameter:
  164.       Looks like tactical information. All field which are under control of
  165.       one civilization seems to be marked by its number (01-07 ?). Besides
  166.       all plain, river and grasslands, which are under no control, gets an
  167.       08-0C.
  168.  
  169.       First block, third parameter:
  170.       Something like the same. But now armees and towns are marked by
  171.       08+number of civilization. There are some unmotivated 02-05 in the
  172.       area under no control.
  173.  
  174.       First block, fourth parameter:
  175.       Defines the small map in the upper left corner:
  176.       00 : unknown (black)
  177.       01 : water
  178.       02 : land
  179.  
  180.       Second block: 
  181.       ??????; the first parameter seems to numerate islands, the second con-
  182.       tains 0C-0F at each plain, river, grassland.
  183.  
  184.       Third block, first parameter:
  185.       Here you can find the attributes of a field:
  186.       Bit 0 : marks a town ?
  187.       Bit 1 : irrigation
  188.       Bit 2 : mines
  189.       Bit 3 : roads
  190.       Bit 4 : railroad (need bit 3)
  191.       Bit 5 : fortification
  192.       Bit 6 : pollution
  193.       Bit 7 : unused ?
  194.  
  195.       Third block, second parameter:
  196.       The same! Because you can find more entries in the first parameter
  197.       then in the second, which you can not see on the screen, it looks like
  198.       that in the first all extensions are stored and in the second only
  199.       those, of which you know that they exist (because one of your armies
  200.       has passed by this point).
  201.  
  202.       Third block, third and fourth parameter:
  203.       ?????????????????
  204.  
  205.       Fourth block:
  206.       ?????????????????
  207.  
  208.       It looks like that somewhere is stored some uninteresting things, too,
  209.       like the colors of the minister pictures.
  210.  
  211.       I have not investigated much time in puzzling out the 'uninteresting'
  212.       parameters. If you get out more, send me a mail.
  213.  
  214. *     The known and unknown areas are stored at 40F8h:7FF8h (3E55h:0740h).
  215.       To this address you must add 32h*(y-Koordinate) + (x-Koordinate). Each
  216.       bit contains the information (1 = known, 0 = unknown) for one of the
  217.       civilizations. There is a byte which contains which civilization you
  218.       are playing (see civext.asm source).
  219.       In version 1 the 40F8h segment starts with informations like, how many
  220.       food, production, ... has a grassland field, ...
  221.  
  222. *     The points of improvement (horses, gold, ...) are calculated by the
  223.       following algorithmus (x, y: coordinates, DIV: integer division). If
  224.       the following condition is fulfilled, then there is an improvement:
  225.  
  226.       [(x DIV 4 * 0Dh) + (y DIV 4 * 0Bh) + MW] and 000Fh
  227.                              = (x AND 3 * 4) + (y AND 3)
  228.      
  229.       The masterword MW can be found at 40F8h:6E00h (41E4h:6E80h). It looks
  230.       like that it defines, too, where the huts are set at the beginning.
  231.       The calculating procedure is set right above the int $F2 call
  232.       (31E2h:187D (31E2h:1739h)).
  233.