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...
[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...
Comment