Announcement

Collapse
No announcement yet.

A little tidbit about Hex Editing.

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

  • A little tidbit about Hex Editing.

    I've found out somemore about byte # 5 (the "fertility" byte) stored in the second map block.

    It seems to be divided into two nibbles (four bit values). The higher order bits seem to control owner ship of land. If a civilization has a city, unit, or has a city actively working a square, this nibble is set to that civ (0 = barbarian, 1=white civ, etc). F
    is used to represent no owner ship.

    If you change the value of this nibble underneath a unit, you can convince units from the same Civ to attack it. For example, if you put a German warrior on a square with a 00 (barbarian) value for the fifth byte, next to a German howizter, the German howitzer will toast the warrior.

    The second nibble seems to control how desirable a square is for city building. Higher values are more desireable with 0 preventing the AI from building a city. 1-7 are used when a square is within a city's radius(or when a city is on the square). 8-F are used otherwise. I haven't figured out exactly how this value is calculated, but I presume it has to do with the food/shield/trade production of the surrounding terrain.

    Examples:

    F0 = Unowned, AI won't build a city
    F8 = Unowned, not very desireable spot.
    01 = Barbarian owned, not very desireable spot near a city (presumably near a barbarian city).

    I've spent a few days testing this out, and it seems to work, but I haven't exhaustively tested it. If anybody finds out that I'm wrong about the above I'd appreciate hearing about it. I hope this is helpful to someone.

    Dusty

  • #2
    For those who find hex editing discussions hopelessly incomprehensible, I suggest you spend a few minutes at Gothmog's web site. He has an excellent introduction to hex editing, including tables and pictures - a godsend to people like me!

    Check it out: Hex Editing
    To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

    From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

    Comment


    • #3
      One application of this is for those scenarios where you want to include settlers/engineers for making terrain improvements but you're wary of the AI building new cities. Simply hex-edit all the map squares as undesirable so the AI won't build cities there. Or let it build cities, but you can tightly control where it is allowed to.

      I love these little titbits. Thanx

      ------------------
      "The man who can smile when things go wrong has thought of someone he can blame it on" - anon

      "Every gun that is made, every warship launched, every rocket fired, signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed" - President Eisenhower
      "I didn't invent these rules, I'm just going to use them against you."

      Comment


      • #4
        An update about hex-editing:

        Trying to rehabilitateh and contribuing again to the civ-community

        Comment

        Working...
        X