Announcement

Collapse
No announcement yet.

About Hex-Editing (Xin Yu?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • About Hex-Editing (Xin Yu?)

    INFO UPDATED:

    [EDITED: I've corrected some wrong info]

    Hi! As you may know, I'm the author of Civ2 PBEM Diplomacy Utility, and I need to know about hex-editing because I'm updating my utility. I use the superb-document "All common knowledge about HEX-EDITING
    SAVED GAMES and more" of Allard H.S. Höfelt.

    I've discovered new bytes on City sections (those section that the famous Civ2-utilities related programmer Xin Yu does with Andrew Livings) that I want to make public.

    - Byte 12th [start counting on 1]: It seems to me that this bytes stores the year that city was conquered [This is related to happy/unhappyness of people: A city conquered only a few years ago have extra unhappiness]. But on a byte you can not store a short integer, only a 8bit integer, so it's very strange. Maybe each 255 turns Civ2 reset this byte. I've done two test in order to check this byte:

    * If you conquer two cities in the same year, byte 12 is the same for the two cities.
    * If you conquer two cities in different years, byte 12 is different for both. And byte 12 th of city last conquered less byte 12 of city first conquered is the difference, in turns, between the two cities conquests... (Always mod 255, because you have only 8 bits to store this info).

    - Byte 13th : This byte represent whose civs knows about the city. You can turn on the city improvement on an tile of a civ map, and put on the visibility of this tile for the same civ, and you will not see the city! Why? Because, in order to see the city, you also need to turn on a bit on this byte. Rigthmost (0th) bit is for barbarian civ,1th bit is for white civ... 7th bit is for purple.

    - Byte 14th to 21th: As you may have noticed, the size of a foreign city is not updated until you move a unit near the city... Where is this size stored? Byte 14th is the size barbarians believe the city has, Byte 15th is the size white civ believe that the city has, and so on until Byte 21th for purple civ.

    I'm pretty sure that the units has a equivalent byte to byte 13th of cities. I'm seeking for it.

    Please use this thread as a way to exchange new info about Hex-Editing...
    Last edited by yaroslav; October 24, 2002, 15:38.
    Trying to rehabilitateh and contribuing again to the civ-community

  • #2
    TIPS

    **** That's what you must do in order to allow other civ (let's call foreign civ) to see a city that original civ has

    1) Turn on the city improvement on city's tile in foreign civ map.
    2) Turn on the foreign civ bit on city tile's visibility byte.
    3) Turn on the foreign civ bit on byte 13th of the city
    4) Put a size for the city (greater than zero) on byte 14th+number_of_the_civ (0 for barbs ... 8 for purple)

    *****If you turn on a civ's bit on byte 13th, but don't put the size, the city will be on SIFTH+C list, but doesn't appear on Map [Like city with wonders before you found them!]

    **** If you modified the size that the city's owner see [for example, if you modify byte 15th on a white city], there is not (visible) effect!
    Trying to rehabilitateh and contribuing again to the civ-community

    Comment


    • #3
      UNITS UPDATE:

      On units, the 10th byte [starting on 1], represents whose civs know where the units is. 0 for barbarians, 1 for romans, 2 for green…

      To the unit to be view, also the unit flag of the unit’s tile on section1 of map must be on.
      Trying to rehabilitateh and contribuing again to the civ-community

      Comment


      • #4
        Re: About Hex-Editing (Xin Yu?)

        Originally posted by yaroslav
        - Byte 14th to 21th: As you may have noticed, the size of a foreign city is not updated until you move a unit near the city... Where is this size stored? Byte 14th is the size barbarians believe the city has, Byte 15th is the size white civ believe that the city has, and so on until Byte 21th for purple civ.
        maybe the value is stored in the spot where the civ that owns it sees. the correct number is where white is viewing white, and purple is viewing purple.

        Comment


        • #5
          The true size of city is stored on byte 10th. Sorry, I was not very clear, but it is stated on 'Hex-edit' document
          Trying to rehabilitateh and contribuing again to the civ-community

          Comment

          Working...
          X