PDA

View Full Version : Everything on Hex Editing


Allard HS
May 5, 2000, 18:20
Everything that is commonly knowledge about hex-editing and a lot of new stuff.

Updated 26th May, 15th May and 20th June.
See later posts for details on what's updated when.

If you wish to save this on disk, and do not wish some formatting to be lost, it is best to edit this post and copy-paste it.

HEX-EDITING SAVED GAMES:

By various authors, mentioned where appropriate.
This text may be copied freely without permission.


LAYOUT OF A SAVED GAME:
=======================
Hex offsets are given, until map information, from where
the values are no longer fixed.

00 - 2F = toggled options, various player settings
30 - 109 = unidentified or empty
10A - 141 = Wonders location (with city ID)
142 - 247 = unidentified or empty
248 - 8E5 = 7 blocks of each F2 bytes long with city style
information, leader and tribe names for all 7 civs
8E6 - 3585 = 8 blocks of each 593 (in hex) bytes long with
various information, like money and techs (a lot
still unidentified) for all 8 civs (incl. barbarians)
3586 - 3594 = map header information
... = map data block 1 (continues a very long time)
... = map data block 2 (quite long too)
... = map data block 3 <a few pages>
... = unit information
... = city information
... = unidentified, and other info such as where the
screen is centred or the cursor is located
... = a bit of text on how the scenario is called, and
probably a bit of history (who's wiped out, etc.)
... = event stuff (starts with EVNT, easy to find)

START OF SAVED GAME FILE:
=========================
(source Allard Höfelt)
(Xin Yu found out about byte 2F toggling civ to be played)
(Captain Nemo found out the civs that are in play in byte 2E)

A : 27 : Conflicts in Civilization or lower
28 : Fantastic Worlds (2.7.81)
2C : Multiplayer Gold
31 : Test of Time
C : 1... .... = bloodlust on/off
.1.. ....
..1. ....
...1 .... = simplified combat on/off
.... 1...
.... .1..
.... ..1.
.... ...1
D : 1... .... = flat/round world
.1.. ....
..1. ....
...1 ....
.... 1...
.... .1..
.... ..1.
.... ...1 = don't restart if eliminated on/off
E : 1... .... = move units without mouse on/off
.1.. .... = enter closes city screen on/off
..1. .... = grid on/off
...1 .... = sound effects on/off
.... 1... = music on/off
.... .1..
.... ..1.
.... ...1
F : 1... .... = cheat menu on/off
.1.. .... = always wait at end of turn on/off
..1. .... = autosave each turn on/off
...1 .... = show enemy moves on/off
.... 1... = no pause after enemy moves on/off
.... .1.. = fast piece slide on/off
.... ..1. = instant advice on/off
.... ...1 = tutorial help on/off
10 : 1... ....
.1.. ....
..1. .... = animated heralds on/off
...1 .... = High Council on/off
.... 1... = civilopedia for advances on/off
.... .1.. = throne room graphics on/off
.... ..1. = diplomacy screen graphics on/off
.... ...1 = wonder movies on/off
14 : ...1 .... = cheat penalty/warning on/off
.1.. .... = scenario file yes/no (no effect really)
16 : 1... .... = announce "we love the king day" on/off
.1.. .... = warn when food dangerously low on/off
..1. .... = announce cities in disorder on/off
...1 .... = announce order restored in city on/off
.... 1... = show non-combat units built on/off
.... .1.. = show invalid build instructions on/off
.... ..1. = warn when city growth halted on/off
.... ...1 = show city improvements built on/off
17 : .... ....
.... .1.. = zoom to city not default action on/off
.... ..1. = warn when new pollution occurs on/off
.... ...1 = warn when changing production will cost shields on/off
1C-1D = number of turns passed
1E-1F = number of turns passed to calculate game year in pop-ups, status bar, etc.
22-23 = specifies which unit is selected at start of the game
(you can find the unit id number by playing another civ, revealing
the map and right clicking on the unit. On the right, the id is
shown between parentheses)
27 = changes which human player is used
28 = player's map which is used
29 = player's civilization number used
2A = changes with map used. Sometimes FF
2B = map revealed or not
2C = difficulty level [deity=5, emperor=4, etc.]
2D = barbarian activity
2E = number of civs still in play [binary]
2F = human player played (can be more than one) [binary]
toggling this byte is great and allows Hotseat mode in FW!!!
32 = amount of polution. 7F is maximum, and will certainly cause global
temperature rising at the end of the turn. A value of 80 till FF
is a negative amount (still shows the icon for global rising),
but it will be reset to 00 at the end of the turn.
33 = amount of times that a global temperature rising has been
happening this far in the game. 7F is maximum and will make the
whole world a big swamp when the next global temperature rising
occurs. 80 or higher will prevent any global rising from happening.
At the moment when terrain should be changed, nothing happens, and
byte 32 is restored to 00, though a message still pops up. Byte 33
will remain at what it was, so it is not reset.
38 = number of turns of peace (counts only after 200th turn)

WONDERS:
========
(source Allard Höfelt)

Near the start of the saved game, on offset 10A until 141 are given the
locations of all wonders. All 28 wonders have 2 bytes, so in total the
block for all wonders is 56 bytes long.
If the 2 bytes for a wonder are
- FF FF : the wonder has not yet been built.
- EF FF : the wonder is destroyed (original city is not stored).
- otherwise the number is the city ID number. 00 00 the first city, etc.


TRIBES:
=======
(source unknown)

The information is stored in 7 blocks (not for barbarians) of F2 length.
The blocks start and end at:
248-339 - 1st block
33A-42B - 2nd "
42C-51D - 3rd "
51E-60F - 4th "
610-701 - 5th "
702-7F3 - 6th "
7F4-8E5 - 7th "

These 7 blocks are all filled with 00's except for a few names and numbers.
These are:

City Style - directly at start of block, one byte long
Leader Name - 3rd byte from start (eg. 250, 341..), 23 bytes long
Tribe Name - 1Ath (26th in decimals) byte from start, 23 bytes long
Adjective - 32th (50th in decimals) byte from start, 23 bytes long

note: City Styles can be any city style, including industrial and modern,
even though without the required advances.
You can even fill in higher numbers here, which however produce
strange effect (as it does everywhere) and may cause the game to
crash.

TECHNOLOGIES & MONEY:
=====================
(source Allard Höfelt)

Byte 8EF until 3585 is devided in 8 blocks of each 593 bytes. Each of
these blocks contain information specific for each civ, such as techs
and money. A lot more in these blocks has as yet not been idendified.

The blocks all start at these offset bytes:
Block of 0th civ: 8E6 - E79 (barbarians)
" 1st civ: E7A - 140D
" 2nd civ: 140E - 19A1
" 3rd civ: 19A2 - 1F35
" 4th civ: 1F36 - 24C9
" 5th civ: 24CA - 2A5D
" 6th civ: 2A5E - 2FF1
" 7th civ: 2FF2 - 3585

Counted from the start of each block:
note: the number given here are all hexadecimals, so the
16th byte in hexadecimal is the 22nd in decimal.

byte 2 - Gender. Male=00 Female=02

byte 3 - Money. The barbarians' money is also changeable.

byte 9 - Research progress. Also updates the colour of research
indicator in status bar on the right.

byte B - Tech which is being researched. FF if cleared or no goal.

byte 15 - Percentages to tax, science and luxuries.

byte 16 - Government. Valid values are 00-07 (though 07 does
not normally exist). A value of 08 or higher causes
the game to crash. 00 is of course Anarchy, 01 is
Despotism, etc.
You can give the barbarians Democracy (06) to prevent
their cities being subverted.

byte 1F - Reputation

byte 25-40 - Treaties. 4 bytes for the treaties with all 7
civs (including their own civ).

1st byte: .... ...1 - contact
.... ..1. - cease fire
.... .1.. - peace
.... 1... - alliance (with peace always)
...1 .... - vendetta
1... .... - embassy
2nd byte: ..1. .... - war
.... .1.. - ???? used by game
3rd byte: ..1. .... - ???? used by game
4th byte: ????
then the 1st byte for the next civ, for all 7 civs.

note: you can also combine them, eg. war and alliance
at the same time. They will repair your units,
but talk with you as if in war. Some more strange
effects.

byte 42-48 - Attitudes. Byte 42 is attitude to 1st player,
43 is to 2nd player, etc.

byte 59-64 - Technologies. B (11) bytes long.
To explain how the bytes work, an example of the first
technology byte:
.... ...1 : 1st technology
.... ..1. : 2nd "
.... .1.. : 3rd "
.... 1... : 4th "
...1 .... : 5th "
..1. .... : 6th "
1... .... : 7th "
In the next byte are the 8th-14th technolgy. Note that for
some reason the .1.. .... is left out. This is not the case
in each of these bytes, though. I don't know why.
Though it's fun to know how it works, it is much much easier
to set techs using the cheat menu.

byte 67-68 - military demographics value.

byte 3E5-3F2 - last contact with civs. First two to 1st civ,
3rd and 4th for 2nd civ, etc.
FF FF if not available, 01 00 for 1, etc.
note: It may be that the FF FF in byte 3E3 and 3E4
are for last contact with barbarians, but that
is not verifiable.


MAPS:
=====
(see Jorrit Vermeiren's Maps explanation)

UNITS INFORMATION:
==================
(source Allard Höfelt)

Located right before the city information. It may be handy to set you hex editor
to show 13/26 bytes per row, so that a unit is exactly 2/1 rows under the one
before him. The units are numbered (right click on a unit and you'll see its id
number) according to the way they're ordered in here.

Find specific unit by toggling eg. veteran status. Alternatively, search for
the location of the unit by searching the x and y coordinates. If your unit is
located at (88,46) look for the hex value 58 00 2E 00.

01-02 = horizontal coordinates of unit
(NOTE: the unit is invisible if moved, unless the terrain it now
occupies has the "contains unit" flag toggled on. See terrains)
03-04 = vertical coordinates of unit (same NOTE as with horizontal)
06 : 1... .... = adds a grey star to the shield, no apparent function
..1. .... = toggles veteran
07 = unit type (counted in rules.txt, 00=settler, 01=engineer, etc.)
08 = owning civilization
11 = number of hitpoints lost
12 = ?? does change
14 = caravan commodity
(00 hides, 01 wool, ..., 0A uranium, F0 food supply, rest makes no sense)
16 = orders:
01 : fortify (not yet fortified, but ordered to do so)
02 : fortified
03 : sentry
04 : build fortress
05 : builds road/railroad
06 : builds irrigation
07 : builds mine
08 : transform terrain
09 : cleans up pollution
0A : builds airbase
0B : go to (see number 19-20 and 21-22)
FF : no orders (can also fill in any other number for no orders, but computer uses FF)
17 = home city with number is city number (FF is none)
(You can find out the city number with for example "find city". If all cities
that are on the map are listed, you can simply count them to find the number)
19-20 = horizontal coordinate of "go-to" command
21-22 = vertical coordinate of "go-to" command
23-24 = link to ?id?'s of other units to be drawn in the same square on top of the unit
(works very strange)
25-26 = link to ?id?'s of other units to be drawn in the same square under the unit
(works very strange)

at location 27, the next unit starts


CITIES:
=======
(source Andrew Livings and Xin Yu)

Search for the city names located near the end of the save game.
The city name itself starts on the 33th hex numbers pair.


01-02 = vertical coordinates of city
03-04 = horizontal coordinates of city
05 : 1... .... can build coastal improvements
...1 .... denotes auto-build under military rule
.... 1... denotes stolen tech
.... .1.. denotes improvement sold
.... ..1. denotes "we love the king day"
.... ...1 denotes civil disorder
07 : ..1. .... can build ships (only if coastal flag is checked)
08 : ...1 .... denotes objective x3
.... .1.. denotes objective x1 (if used both it will be x2)
09 = city owner [00-07 (don't use >7)]
10 = city size (negative sizes cultivate no squares but produce food)
11 = who originally built the city [00-07]
15-21 = working city production squares??
23-26 = specialists, 4 hex positions representing 16 base 4 numbers representing specialists
0=none, 1=elvis, 2=tax, 3=sci.
example: 06000000, first hex 06=1*4+2: 1 taxman and 1 elvis
27-28 = food in food box (FF=famine)
29-30 = shields in shield box
31-32 = net trade (not including those from trade routes)
33-47 = city name buffer [15 characters, end with a 00]
48 = 00, city name cannot exceed 15 characters
49 = workers in inner circle (8 squares next to city square) [ff=all worked]
50 = workers on 8 of the outer circle
51 = workers on 4 of the outer circle
[first digit is always 1, the second digit represents the 4 working positions]
52 = number of specialists times 4 [eg. 08=2 specialists]
53-57 = city improvements:
1... .... is 7th improvement
.1.. .... is 6th improvement
..1. .... is 5th improvement
...1 .... is 4th improvement
.... 1... is 3rd improvement
.... .1.. is 2nd improvement
.... ..1. is 1st improvement
58 = item in production (can be used to force production)
[units 00-3f]
(improvements are inversed [FF=1st FE=2nd etc])
59 = number of active trade routes [decimal, can also be >03]
60-62 = 1st, 2nd and 3rd trade commodities available
- [00-0F (are 1st-15th in rules.txt)]
- supplied trade goods, eg (Coal), are inverse values.
eg., commodity 13 is already supplied, the value is F3 (-13)
- if in paranthesis use FF compliment (can force trade commodity
eg., 0F=Uranium, F0 = (Uranium), which is ff-0f
63-65 = 1st, 2nd and 3rd trade commodities demanded
66-68 = 1st, 2nd and 3rd trade commodities in route
69-74 = 1st, 2nd and 3rd trade route partner city number (city number is 85th-86th position)
75-76 = science
77-78 = tax
79-80 = number of trade icons (including trade routes)
81 = total food production
82 = total shield production
83 = number of happy citizen
84 = number of unhappy citizen (double unhappy count twice??)
85-86 = sequence number of this city, used to idendify the city. Very useful!
87-88 = ?? always 0000 ??


OTHER
=====
(source Allard Höfelt)

- 3C-3F bytes after the last city has been finished are the coordinates of the cursor.

- 3B1-3B2 bytes after the last city has been finished are the zoom factors. For zooming
in, change byte 3B1 only. For zooming out, change byte 3B2 to FF and lower
the value of byte 3B1 beginning with FF.
note: F9 FF is the lowest zoom you can get. Lowering it further causes
the game to crash. There is no limitation when zooming in.

- 583-58A control the size of the city screen.
<font size=1 face=Arial color=444444>[This message has been edited by Allard HS (edited June 20, 2000).]</font>

Xin Yu
May 5, 2000, 19:04
Allard: Great job! If you attach an example it would be even better.

Harlan
May 5, 2000, 19:30
Allard, hey some really GREAT work here! This should definitely be made a scenario league tip before it gets lost as an old forum post.

Some stuff could use a bit more clarification though. For instance, what happens when you change the sequence number of a city? What happens if you say, give a high total food value of a city siting in a desert? Will the game get wise at some point and recalibrate that number, leading to sudden starvation? On the city architecture byte, is that permanent even if techs leading to industrial or modern style are discovered later?

Panda
May 5, 2000, 19:48
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>TRIBES:=======
(source is from common knowledge)
2 before tribename = city style can be any city style, including industrial and modern without the required advances.
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

That will be very useful.

But I'm a bit confused by this:

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>C : 1... .... = bloodlust on/off .1.. .... ..1. .... ...1 .... = simplified combat on/off .... 1... .... .1.. .... ..1. .... ...1
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

How does that translate into the hex value we use, please?

Allard HS
May 6, 2000, 06:08
Please note that these values are not all my work. Only there where my name stands on top has been found by me. The rest I simply assembled from all other information available. Therefore http://apolyton.net/forums/frown.gif I also do not understand all of it, especially the city sequence numbers. Ask that Xin or Andrew.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>On the city architecture byte, is that permanent even if techs leading to industrial or modern style are discovered later
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

Then it changes, if you have any of the old styles. Which is logical, because the game will automatically save the style there. And the style later upgrades. That in itself is no great innovation, but the trick is that you can set the civ to have modern cities without the required techs. Or industrial, which will (not tested that one though) upgrade to modern with the required techs.
This trick can allow good savings on the length of tech trees. Instead of giving one civ annoying techs, you can just set it here.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>How does that translate into the hex value we use, please?
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

it's an unprofessional way of talking. What I mean with .... ...1 is in hexadecimal 01 and .... ..1. is 02. So adding both of them would give .... ..11 which is 03. The . basically means that it can be any value but has no importance for this.
I have no experience with hex-editing before, so it's probably not the best way of making it clear, but I thought it worked pretty ok like this.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Allard, hey some really GREAT work here! This should definitely be made a scenario league tip before it gets lost as an old forum post
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

I thought it handier to post it here. Reaches more people http://apolyton.net/forums/smile.gif

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Allard: Great job! If you attach an example it would be even better
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

I'll leave that too others http://apolyton.net/forums/smile.gif

Harlan
May 7, 2000, 17:10
I answered my own question asked above:

What happens if you say, give a high total food value of a city siting in a desert? Will the game get wise at some point and recalibrate that number, leading to sudden starvation?

Unfortunately, it doesn't work. Changing this hex seems to have no effect at all, nor does changing the shields a city has. I guess the game must recalibrate this number as it loads, cos if the Rules.txt terrain stats change, these have to change too.

Civfan
May 9, 2000, 01:17
Finally understand this hexedit thing. thanks Allard and everyone who discovered these tricks to the game. I finally fixed several problems I had in my scenario.

Civfan..

------------------
Read my Joke of the Day at Offtopic forum. Do it now or you will ummmmm who cares......

Hollyshit, i'm a prince now. Damn to much time spent on this game. :)

Allard HS
May 12, 2000, 16:34
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Unfortunately, it doesn't work. Changing this hex seems to have no effect at all, nor does changing the shields a city has. I guess the game must recalibrate this number as it loads, cos if the Rules.txt terrain stats change, these have to change too
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

these kind of recalibrations seems to be so quite a lot if you make little "mistakes" at some places. Which is quite unfortunate, because some would, as what you are proposing, as far as I understand it, be quite interesting.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Finally understand this hexedit thing. thanks Allard and everyone who discovered these tricks to the game. I finally fixed several problems I had in my scenario
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

http://apolyton.net/forums/smile.gif

Panda
May 14, 2000, 13:42
Well, good news.

Now that I finally figured out that it was a reference to binary values I've realised that both the civ's technologies and city improvements are both stored as binary numbers. Thanks, Allard.

Good news: found the starting locations for each civs technologies and gold:

<TABLE BORDER=0><TR><TD>CIV</TD><TD>MONEY</TD><td>TECHNOLOGY</TD></tr><TR>
<TR><TD>BARBARIAN</TD><TD>2280+2281 ( 8E8)</TD><td>2366 ( 93E)</TD></tr><TR>
<TR><TD>1</TD><TD> 3708 ( E7C)</TD><td> 3794 ( ED2)</TD></tr>
<TR><TD>2</TD><TD> 5136 (1410)</TD><td> 5222 (1466)</TD></tr>
<TR><TD>3</TD><TD> 6564 (19A4)</TD><td> 6650 (19FA)</TD></tr>
<TR><TD>4</TD><TD> 7992 (1F38)</TD><td> 8078 (1F8E)</TD></tr>
<TR><TD>5</TD><TD> 9420 (24CC)</TD><td> 9506 (2522)</TD></tr>
<TR><TD>6</TD><TD>10848 (2A60)</TD><td>10934 (2AB6)</TD></tr>
<TR><TD>7</TD><TD>12276 (2FFA)</TD><td>12362 (304A)</TD></tr></table>

Bad news: editing the barbarian's technology is not so straight-foward, which was the whole point of the investigation.

Bad news: the city information (in FW at least) only contains 84 bytes, not 88, so there is no index number for the city included within this space. Byte 86 in the above list is simply the vertical coordinates of the next city.

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

Allard HS
May 14, 2000, 15:17
Damn! I just found out exactly the same about techs and money today! Well, also some more things fortunately. I'll post it tomorrow if i got any time left.

Allard HS
May 15, 2000, 05:48
I updated the list today, in the first post on the topic. To make it more clear what has been added, here are the new things I found out.


LAYOUT OF A SAVED GAME:
=======================
Hex offsets are given, until map information, from where
the values are no longer fixed.

00 - 2F = toggled options, various player settings
30 - 247 = unidentified or empty
248 - 8E5 = 7 blocks of each F2 bytes long with city style
information, leader and tribe names for all 7 civs
8E6 - 3585 = 8 blocks of each 593 (in hex) bytes long with
various information, like money and techs (a lot
still unidentified) for all 8 civs (incl. barbarians)
3586 - 3594 = map header information
... = map data block 1 (continues a very long time)
... = map data block 2 (quite long too)
... = map data block 3 <a few pages>
... = unit information
... = city information
... = unidentified, and other info such as where the
screen is centred or the cursor is located
... = a bit of text on how the scenario is called, and
probably a bit of history (who's wiped out, etc.)
... = event stuff (starts with EVNT, easy to find)

START OF SAVED GAME FILE:
=========================

A : ---27 : Conflicts in Civilization or lower
---28 : Fantastic Worlds (2.7.81)
---2C : Multiplayer Gold

22-23 = specifies which unit is selected at start of the game
(you can find the unit id number by playing another civ, revealing
the map and right clicking on the unit. On the right, the id is
shown between parentheses)

TRIBES:
=======
(source unknown)

The information is stored in 7 blocks (not for barbarians) of F2 length.
The blocks start and end at:
248-339 - 1st block
33A-42B - 2nd "
42C-51D - 3rd "
51E-60F - 4th "
610-701 - 5th "
702-7F3 - 6th "
7F4-8E5 - 7th "

These 7 blocks are all filled with 00's except for a few names and numbers.
These are:

City Style - directly at start of block, one byte long
Leader Name - 3rd byte from start (eg. 250, 341..), 23 bytes long
Tribe Name - 1Ath (26th in decimals) byte from start, 23 bytes long
Adjective - 32th (50th in decimals) byte from start, 23 bytes long

note: City Styles can be any city style, including industrial and modern,
even though without the required advances.
You can even fill in higher numbers here, which however produce
strange effect (as it does everywhere) and may cause the game to
crash.

TECHNOLOGIES & MONEY:
=====================

Byte 8EF until 3585 is devided in 8 blocks of each 593 bytes. Each of
these blocks contain information specific for each civ, such as techs
and money. A lot more in these blocks has as yet not been idendified.

The blocks all start at these offset bytes:
Block of 0th civ: 8E6 - E79 (barbarians)
" 1st civ: E7A - 140D
" 2nd civ: 140E - 19A1
" 3rd civ: 19A2 - 1F35
" 4th civ: 1F36 - 24C9
" 5th civ: 24CA - 2A5D
" 6th civ: 2A5E - 2FF1
" 7th civ: 2FF2 - 3585

Counted from the start of each block:
note: the number given here are all hexadecimals, so the
16th byte in hexadecimal is the 22nd in decimal.

byte 2 - Gender. Male=00 Female=02

byte 3 - Money. The barbarians' money is also changeable.

byte B - Tech which is being researched. FF if cleared or no goal.

byte 16 - Government. Valid values are 00-07 (though 07 does
not normally exist). A value of 08 or higher causes
the game to crash. 00 is of course Anarchy, 01 is
Despotism, etc.

byte 1F - Reputation

byte 25-40 - Treaties. 4 bytes for the treaties with all 7
civs (including their own civ).

1st byte: .... ...1 - contact
.... ..1. - cease fire
.... .1.. - peace
.... 1... - alliance (with peace always)
...1 .... - vendetta
1... .... - embassy
2nd byte: ..1. .... - war
.... .1.. - ???? used by game
3rd byte: ..1. .... - ???? used by game
4th byte: ????
then the 1st byte for the next civ, for all 7 civs.

note: you can also combine them, eg. war and alliance
at the same time. They will repair your units,
but talk with you as if in war. Some more strange
effects.

byte 42-48 - Attitudes. Byte 42 is attitude to 1st player,
43 is to 2nd player, etc.

byte 59-64 - Technologies. B (11) bytes long.
To explain how the bytes work, an example of the first
technology byte:
.... ...1 : 1st technology
.... ..1. : 2nd "
.... .1.. : 3rd "
.... 1... : 4th "
...1 .... : 5th "
..1. .... : 6th "
1... .... : 7th "
In the next byte are the 8th-14th technolgy. Note that for
some reason the .1.. .... is left out. This is not the case
in each of these bytes, though. I don't know why.
Though it's fun to know how it works, it is much much easier
to set techs using the cheat menu.

byte 3E5-3F2 - last contact with civs. First two to 1st civ,
3rd and 4th for 2nd civ, etc.
FF FF if not available, 01 00 for 1, etc.
note: It may be that the FF FF in byte 3E3 and 3E4
are for last contact with barbarians, but that
is not verifiable.

OTHER
=====

- 3c-3f bytes after the last city has been finished are the coordinates of the cursor

Panda
May 15, 2000, 14:31
This is going v. well. I'm trying to beef up my barbarian power with some basic technologies. Now I have got to try and see if establishing diplomatic relations works http://apolyton.net/forums/smile.gif

I think I found something odd about one of the city information bytes, and I'm also trying to see what effects ending the very first turn has, because as you know you can capture all of a civs gold from any city on the very first turn but never afterwards. I'll post again when I know anything concrete.

I wonder if Civfan has come up with anything new.

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

Harlan
May 15, 2000, 15:12
More great stuff you're doing, guys.

One question: has anyone seen where the pollution/global warming related hexes are? I wonder if this is one area where one could fool the computer, delaying the onset of global warming, perhaps even starting the game with negative numbers in the counter towards global warming.

blackclove
May 24, 2000, 22:26
Two things occur to me as I review this:

1) You could periodically reset the tech level to zero and build an entirely new rules.txt file with a new tech tree. Simply read off, say, the twenty most advanced technologies on your "ancient tech tree" and make them the FIRST twenty technologies of your "industrial tech tree". Then for each tribe set the appropriate starting techs. Anyone who was more techs behind than that gets an instant "tech leap".

2) You could also simultaneously scan for ALL outdated units (e.g., militiamen) and replace them with an equivalent modern unit. For example, when the late modern age starts, you might turn all ancient units in every civilization to riflemen. After all, nowadays even the most pathetic nation has riflemen of some sort. This would let you start the units file over again with an entirely new set of units.

Does anyone know the formula for the number of lightbulbs required for a tech advance? If one were to create such a modpack then this would become important. Because the cost of discovering a new tech seems to depend on the number of techs you already have, you'd need to either set the changeover to occur at times of "rapid innovation" like the Renaissance and the Modern Age, or else strategically change the tech paradigm for the scenario at the same time.

I think I'm starting to drool....

Archangel
May 26, 2000, 01:04
Does anyone know if you can hex edit a save file to change the number of units allowed in the game at once?

blackclove
May 26, 2000, 09:21
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font><font size=1>Originally posted by Archangel on 05-26-2000 01:04 AM</font>
Does anyone know if you can hex edit a save file to change the number of units allowed in the game at once?
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

I don't think this is possible, but using the technique I described above we might, with a simple program and a new rules.txt and units.gif, be able to have an INFINITE number of units by "rolling over" the tech tree periodically.

Captain Nemo
May 26, 2000, 09:40
Even without the Hex-edit you can accomplish this to a certain extent by relying on the AI's eagerness to disband obsolete units and using Leonardo's for the Human player.

Here is an example I am using in RedFront 1.941:

There are 3 slots for Soviet fighters. At any time the Soviets have 2 active fighters, A & B and are researching C. A is already obsolete and will be upgraded to B by Leonardo's next time a tech is discovered. When C is discovered, all As become Bs. On the next rules/units load slot A is used for new fighter D and B is made obsolete by the tech required for C... and so on. 3 slots, infinite units.

Captain Nemo
May 26, 2000, 09:56
Working on Second Front I made some interesting discoveries for scenario builders:

-Ship units can paradrop unto landsquares and become immobile...Old news...well not really: If they are transport ships they carry their cargo with them! Now you have air transport!

-If you build airbases "on" water the ships can start their paradrop from there...This can really made some very interesting scenarios, whether space travel (Star gates?) or Assault Gliders (Second Front)...I can't even list all the ideas I have had about this.

-Domain 3 units are like helicopters but they act like ships if their trireme bit is set (They sink!) They can't capture cities unlike helicopters, they travel on water and land, they are vulnerable to regular ground fire.

-The trireme check looks at all surrounding squares to see if there is land but not at the square itself... That means that a land unit with the trireme bit set landing on an size 1 island will SINK! Weird...

-If you hex edit a city location to be on water, the city continues to exist under water...But becomes invisible except for the name...I haven't fully investigated all it's effects (Like can it be attacked? Can it build land units which appear in the middle of the ocean? Can enemy ships "sail" over it when it has no units in it?)

And there are many more...

Allard HS
May 26, 2000, 15:54
Nemo, you're not entirely right on your last point:

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>If you hex edit a city location to be on water, the city continues to exist under water...But becomes invisible except for the name...I haven't fully investigated all it's effects (Like can it be attacked? Can it build land units which appear in the middle of the ocean? Can enemy ships "sail" over it when it has no units in it?)
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

What you saw is the same that happens to a city if you change its coordinates to anything else than it was, also on land squares. What you need to do is change the flag of the terrain on the square you're moving the city to to properly show the city. This is explained by Jorrit Vermeiren (Mercator) in his guide on how to hex-edit the terrains, which I did not include in my hex-editing text because it is so long.

What you need to do is change one byte on the hex of the terrain where the city is moving to and one on the hex of the square where is stood before to make it complete. Units, obviously, will not move with the city.

This works well, and a city will be located in the middle of the ocean. It can even grow food, build units (both land and sea and air). However, no land unit will be able to occupy the place, as it cannot "land". Also ships will simply appear to sail "through" it, with no special effect, though located in an enemy city. Only Helicopters are able to conquer the city.

All in all, your discovery, Nemo, seems to have quite some possibilities. Especially the fact that only heli's can capture it, calls for a special "aquanauts" unit or something to be used to conquer Atlantis. Or of course a Nautilus http://apolyton.net/forums/smile.gif.

Allard HS
May 26, 2000, 16:03
Some updates on what I found this week:

START OF SAVED GAME FILE:
=========================
A : 31 : Test of Time

32 = amount of polution. 7F is maximum, and will certainly cause global
temperature rising at the end of the turn. A value of 80 till FF
is a negative amount (still shows the icon for global rising),
but it will be reset to 00 at the end of the turn.
33 = amount of times that a global temperature rising has been
happening this far in the game. 7F is maximum and will make the
whole world a big swamp when the next global temperature rising
occurs. 80 or higher will prevent any global rising from happening.
At the moment when terrain should be changed, nothing happens, and
byte 32 is restored to 00, though a message still pops up.
38 = number of turns of peace (counts only after 200th turn)

These last three (32, 33, 38) were found on Harlan's request a while ago. Lightbulbs are determined by the amount of research already found rather than that the current colour of the bulb is stored in the saved game. Same for nuclear activity icon.

TECHNOLOGIES & MONEY:
=====================
byte 9 - Research progress. Also updates the colour of research
indicator in status bar on the right.

byte 15 - Percentages to tax, science and luxuries.

byte 16 - Government. Valid values are 00-07 (though 07 does
not normally exist). A value of 08 or higher causes
the game to crash. 00 is of course Anarchy, 01 is
Despotism, etc.
You can give the barbarians Democracy (06) to prevent
their cities being subverted.

byte 67-68 - military demographics value.


OTHER
=====

- 3B1-3B2 bytes after the last city has been finished are the zoom factors. For zooming
in, change byte 3B1 only. For zooming out, change byte 3B2 to FF and lower
the value of byte 3B1 beginning with FF.
note: F9 FF is the lowest zoom you can get. Lowering it further causes
the game to crash. There is no limitation when zooming in.

- 583-58A control the size of the city screen.

Not so many useful new stuff, but I wanted to keep you informed of what news I found.

I'll also update the first post of the thread now.

Captain Nemo
May 26, 2000, 17:38
I was mainly trying to find a way to build a bunch of cities (Up to 255) and place them on water to make them unusable...That didn't work. What seems to work is to place a whole bunch of cities at the same coordinates! They all continue to exist in the game file and use up the extra city spaces, to preventing the building of new cities without taking up a bunch of map space.

Another very interesting one: Edit city locations to be adjacent...That way you can build mega-cities covering 2, 3 or 4 squares. This would be useful in scenarios where 2 opponents hold adjacent parts of the same city (East-West Berlin, Stalingrad...)

Gothmog
May 27, 2000, 08:51
Here’s some more stuff on hex editing I discovered while trying to create a formula for determining the location of the city table in the save file. The information already stated in this thread was very helpful towards that end.

BASIC INFORMATION

In all Civ2 Formats (all offsets stated in hex)
Offset 3A-3B: Number of units stored as an integer
Offset 3C-3D: Number of cities stored as an integer
Never change these! They are needed to calculate the locations of save file structures such as the city table. Note: integers are stored somewhat in reverse. A decimal value of 294 in integer is Hex'26 01', not Hex'01 26' like you'd expect.
I deduced these locations from Angelo Scotto’s Civconverter program which states these values when it runs.

MAP INFORMATION:

The map header is at a fixed location depending on file format.
Offset 3586 in FW and later
Offset 3478 in CIC and earlier

The map header is 14 bytes long
~ Map X dimension : integer (2 bytes).
~ Map Y dimension : integer (2 bytes). A 50 by 80 map will show up as 100 by 80 here.
~ Map Area: integer (2 bytes) or X times Y divided by 2.
~ Flat Earth Flag: integer (2 bytes). 1 = flat, 0 = round.
~ Map Seed: integer (2 bytes). I haven’t fooled around with this yet to see if it might change the resource pattern in an active game.
~ Locator Map X dimension : integer (2 bytes): equals ‘Map X’ divided by 4 rounded up.
~ Locator Map Y dimension : integer (2 bytes): equals ‘Map Y’ divided by 4 rounded up. The locator map is the small map in the corner.

THE MAP BLOCKS:
These begin immediately after the header.
~ Block 1 contains terrain improvement data, such as irrigation. This block is 7 times the ‘Map Area’ bytes long.
~ Block 2 Contains the basic terrain type data. This block is 6 times the ‘Map Area’ bytes long.
~ Block 3 is the locator map. It's stored in 2 pieces, each piece being ‘locator map x’ times ‘locator map y’ bytes long.
~ Note: Viewing the save file in graphical mode in the hex editor is what allowed me to figure out what these map blocks lengths were. When I oriented the hex editor to start viewing at the beginning of map block 3 and made the width of the display the same as the ‘locator map X dimension’, I could see two little maps! So when you’re looking around a save file, you might want try graphical mode to see the big picture.

UNIT TABLE
When you add 1024 bytes to the end of map block 3, you end up at the start of the unit table. Each unit table entry is 26 bytes long and has the ‘number of units’ value stored at offset 3A-3B number of entries.

CITY TABLE
It starts immediately after the Unit table (no slack bytes). Each city table entry is 84 bytes long and has the ‘number of cities’ value stored at offset 3C-3D number of entries.

The ANZAC
May 28, 2000, 17:10
I must seem out of it, but how do you know which lines to edit? And which is the write set of numbers? I have a hexeditor and I opened up a scenario file, but what do you do exactly?

------------------
"There's one more thing you men can say when it's all over and you're home once more. You can thank God that twenty years from now when you're sitting by the fireside with your grandson on your knee, and he asks you what you did in the war, you won't have to shift him to the other knee, cough and say, 'I shovelled shit in Louisiana.'"
-General George S. Patton addressing his troops before D-Day landings June 1944

Harlan
May 28, 2000, 19:34
Allard,
Does your latest research on pollution mean that in effect, one can turn off the global warming effect? Edit byte 33 to be 80 or greater, or does that byte reset to 0 somehow?

If so, Capt. Nemo, you could have the Allied bombing of Germany actually be nukes that create rubble (in fact, pollution) that would cut the productivity of squares around the cities, and soften up defenses, allowing Allies to conquer places when you want them to. Better than rubble as units.

Archangel
May 30, 2000, 00:08
Nemo, I wasn't talking about changing the amount of units in the units.bmp file, but the actual amount the map will hold. Like in Red Front, how sometimes you get the "too many units" message and new units won't be created. I want to know if you can hex edit that problem.

Allard HS
June 20, 2000, 09:44
sorry, haven't been online too often lately, so I couldn't update this thread.

Gothmog, very interesting!!! I think we now understand the building of the saved game pretty well. And what's funny is that the saved games of Colonization and even civ1 are pretty similar.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Another very interesting one: Edit city locations to be adjacent...That way you can build mega-cities covering 2, 3 or 4 squares. This would be useful in scenarios where 2 opponents hold adjacent parts of the same city (East-West Berlin, Stalingrad...)
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

http://apolyton.net/forums/smile.gif Always trying to make things practical... Serious, this is very cool! Wow! And if you change the background terrain too a bit you can even make it look like one big city.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>I must seem out of it, but how do you know which lines to edit? And which is the write set of numbers? I have a hexeditor and I opened up a scenario file, but what do you do exactly?
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

it's really very easy. before I started I almost knew nothing about hex-editing myself. It's all pretty obvious. If you have a good editor it will tell you (usually somewhere at the bottom of the screen) what the offset is of the currently selected hex. The layout of the saved game is explained at the start of my first post. And you see that using FW until the map info everything is always at the same offset. After that it starts to be variable, but mostly it is pretty clearly visible when going from one area to the next. Watching the LAYOUT chapter should explain it mostly to you.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Does your latest research on pollution mean that in effect, one can turn off the global warming effect? Edit byte 33 to be 80 or greater, or does that byte reset to 0 somehow
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

Yes. If you turn byte 33 to be 80 you can switch off global warming completely. I'll try to explain it in some more details so that everybody understands it, even without knowledge of hex-editing.

The thing is, normally byte 32 and 33 both stand at 0. If there is pollution, byte 32 gets higher and higher, and at a certain amount global warming will happen. Maybe there is a x% chance of this happening determined by this byte. If global warming happens, byte 32 is reset to 00, and byte 33 is set to 01, which is logical, cause if byte 32 would not be reset to 0, there would be again a chance of global warming. This goes on and on, and byte 33 gets higher after every global warming.

However if you set byte 33 higher than 7F, the max, byte 32 will still get higher, of course still causing global warming still to occur, which causes the pop-up. Normally, it will cause a 1st, a 2nd, a 3rd.. to a 7Fth rate global warming, determined by byte 33, but since that is turned to a strange rate, nothing happens at all, and byte 32 is reset without anything happening.

Byte 33 remains at 80, and appears to remain so every time again.
This makes a foolproof anti-global warming tool that allows pollution. Two things still have to be taken care of, which could if used right give some extra fun. The icon for pollution itself, and the pop-up message (with a nice little logo of the game).

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Nemo, I wasn't talking about changing the amount of units in the units.bmp file, but the actual amount the map will hold. Like in Red Front, how sometimes you get the "too many units" message and new units won't be created. I want to know if you can hex edit that problem
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

The amoung of units in the units.gif/bmp file SHOULD be changeable. After all, that's what they did changing from CiC to FW, and that change was so minor, you might be able to track it down. In the file civ2.exe of course, not in a saved game.
The too many units/cities will be probably trickier to change. It still could, but you'd have to insert a byte, I guess, screwing the whole file up. To fix that you'd need a lot of expertise. Maybe some expert at programming or hacking might explain how to do this. I mean, it should be possible. You could change anything if you wanted.

Both problems anyway could only be changed by editing the civ2.exe file, which I haven't done yet, so I know nothing about it (except changing the font the game uses). And both are pretty tricky.

Prometeus
June 20, 2000, 10:39
To Nemo - ship paradropping and the other stuff ...

Are you sure about that?
I planned an year ago to realize a scenario on the "One Year War" ( the "Gundam series", do you know? ). If this trick works for true, it'll be a lot useful in order to perform Zion Komusai landing on Earth...

SCDARS
June 20, 2000, 13:04
I'm sorry if it's already mentioned here, but does anyone know which hex value specifies which wonders are already build/ destroyed?
Could you even create multiple wonders?

Allard HS
June 20, 2000, 13:50
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>I'm sorry if it's already mentioned here, but does anyone know which hex value specifies which wonders are already build/ destroyed?
Could you even create multiple wonders
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

That's a great question!! Thanks to you I uncovered 3 more lines of the file. Here comes the new stuff, it's also updated in the main story.

As you see, it's unfortunately not possible to create the same wonders multiple times. If it would have been listed as one of the city improvements with the city information stuff, it would have, but this makes it strictly buildable only at one place.
Here comes the info:


WONDERS:
========

Near the start of the saved game, on offset 10A until 141 are given the
locations of all wonders. All 28 wonders have 2 bytes, so in total the
block for all wonders is 56 bytes long.
If the 2 bytes for a wonder are
- FF FF : the wonder has not yet been built.
- EF FF : the wonder is destroyed (original city is not stored).
- otherwise the number is the city ID number. 00 00 the first city, etc.


If you come up with more interesting questions...

The ANZAC
June 20, 2000, 18:14
Thanks for looking at my post. Do you know a good hex editor, that's free? And if not, anything that's good!

The ANZAC
June 20, 2000, 18:15
BTW do you have a second topic on hexediting? If so what's the URL?

Allard HS
June 20, 2000, 19:06
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Thanks for looking at my post. Do you know a good hex editor, that's free? And if not, anything that's good.
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

I use Hex Workshop. It's ok. You can download it here:
http://www.bpsoft.com/downloads/ .
It's shareware but if you type in 90401-426325-78F0 as the code, it gets free http://apolyton.net/forums/smile.gif (on the 3.x version, not older ones).
There might be some better ones, but I doubt for free.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>BTW do you have a second topic on hexediting? If so what's the URL?
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

no, why would I make two threads about the same?

Mercator
June 21, 2000, 07:05
I personally find A.X.E. rather nice. And best of all, it's a legally http://apolyton.net/forums/biggrin.gif free HEX-editor. It can be found at http://www.kahei.com
Keep up the good work everyone!

Edit: Nevermind that link, try this instead:
http://www.civgaming.net/mercator/files/axe21.zip

Captain Nemo
June 21, 2000, 21:46
Yes, the ships paradropping while carrying cargo works. I have implemented it in Second Front.

Gothmog
June 22, 2000, 05:36
Allard,
A few more things I've learned since my last posting.
In the second tribe record (the big one), location Hex 69, is a city count. It shows up in MGE when you start a multiplayer game. Otherwise, I think it has no effect on the game.

In MGE a unit entry is 32 bytes long versus 26 for earlier versions and city entry is 88 bytes long versus 84 for earlier versions. What the extra bytes are I don't know yet.

Prometeus
June 22, 2000, 05:48
Thanks a lot Nemo!
Call me Gyren Zabi, now.... http://apolyton.net/forums/biggrin.gif
<font size=1 face=Arial color=444444>[This message has been edited by Prometeus (edited June 22, 2000).]</font>

Panda
June 22, 2000, 16:16
Gothmog:

I did point out eailer that the city information in FW contains only 84 bytes, not 88. Perhaps in MGE format it is 88 and 85+86 is the city index number as stated above.

All:

There is a really great (free) Hex Editors I use. Hex Wizard http://members.xoom.com/Hexwizard/index.htm , allows you to compare two files. But it doesn't allow to pasting information.

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

Gothmog
June 23, 2000, 08:50
Andrew,
By earlier versions, I meant FW and CIC. I didn't mean to contradict you. Your city hex editing page has been of enormous help to me!
When I started hacking around an MGE saved file, I realized the city entry was longer for the MGE format only. I suppose ToT is different yet again. I haven't poked around there yet.

SCDARS
June 23, 2000, 17:45
Allard: Thank you for your very prompt help!
You prevented me from restarting my scenario after more than a year of work... http://apolyton.net/forums/smile.gif
Gothmog mentioned "city count showing upin MGE"...
This brought me to the question about another kind of "city count": Where is the number of built cities per civ stored... I mean the value that determines which city name# will be picked out of city.txt when the next one is build?

I remember that in good old Colonization it was quite easy to find, and I already thought I had located it, but then I realized I was wrong... http://apolyton.net/forums/wink.gif

techumseh
May 11, 2001, 11:17
Just wondering if anyone's been doing any hex editing based on this great research done last year?

Henrik
May 11, 2001, 14:12
This is amazing thanks for bumping the topic, i had no idea something as thurough as this had been done http://apolyton.net/forums/eek.gif

Henrik
May 11, 2001, 14:20
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font><font size=1>Originally posted by Allard HS on 05-05-2000 06:20 PM</font> byte 16 - Government. Valid values are 00-07 (though 07 does
not normally exist). A value of 08 or higher causes
the game to crash. 00 is of course Anarchy, 01 is
Despotism, etc.
You can give the barbarians Democracy (06) to prevent
their cities being subverted.
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

Could someone please elaborate on this? What happens whit a 07 govt, how will the game handle it?

JMarks
May 13, 2001, 21:35
Hey, I was reading through this topic, and saw that one could place cities next to each other. I was wondering, could one possibly place the cities on top of each other? If that could happen, what would the effects be? If everything was satisfactory, could it be the answer to the Americans based in UK in WWII scenarios without combining the two countries?

Heresson
May 14, 2001, 18:42
In fact, I've discovered the way to put cities on each other without
hex-editing some time ago. it's very nice thing, it can be very very useful.

Pap1723
May 14, 2001, 22:51
Heresson-
Can you please share with the rest of us how you can accomplish that?

Heresson
May 15, 2001, 09:22
I can tell, but won't ;-P

Henrik
May 15, 2001, 09:33
why not http://apolyton.net/forums/confused.gif

Pap1723
May 15, 2001, 10:39
Dude, that really isn't cool.
Almost no one holds back information, because it allows everyone to make awesome scenarios that everyone can play and enjoy. I know that I could really use it for my new scenario, so please don't be so rude, and share your knowledge.

Pap

Mr. Oobir
May 15, 2001, 11:46
I'm not sure, but this might make stacked cities (without hex-editing): Place a Settler/Engineer in a foreign city (via the Cheat menu). Ownership problems could be taken care of by bribing the city. Just a guess, though.

EDIT: Nope, this doesn't work. Has the 'Join City' option rather than 'Build a New City.' And I thought I had something there...
<font size=1 face=Arial color=444444>[This message has been edited by Mr. Oobir (edited May 15, 2001).]</font>

Heresson
May 16, 2001, 00:21
No, that's not it http://apolyton.net/forums/wink.gif

Allard HS
May 16, 2001, 18:45
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>Could someone please elaborate on this? What happens whit a 07 govt, how will the game handle it?
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

Why don't you try it out? I didn't really put too much research into it, as I did not really care. It did seem to work, so I put that notice, just in case anyone might find it handy.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>I was wondering, could one possibly place the cities on top of each other?
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

Very easily. You can change cities' locations to anything you wish, on top of another next to another, at sea or on mountains. The tricky part is, though, that you have to change the terrain where it is to be moved to to have the flag "city is here", and remove that same flag from where you moved it from. This is quite complicated, and I advise you to ask Jorrit Vermeiren (Mercator) as he is the expert on that subject.
Effects of cities on the same spot? Well, it just will never become a big city, as it won't have a lot of food.

<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font>In fact, I've discovered the way to put cities on each other without
hex-editing some time ago. it's very nice thing, it can be very very useful.
<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

Yes, there seem to be some ways, one of which I recently was informed of by someone (not Heresson), but who wishes to keep it secret for the time being. (I guess the same reason as Heresson)

MagyarCrusader
May 16, 2001, 22:55
Man... the attitude of scenario creators have changed since my day. Back them, the only problem we had was Alex more acting like a ***** over his precious units, but this is getting worse. What ever happened to the era of the SLeague where everyone would share their knowledge to increase the quality of ALL scenarios in general. I mean, who cares if someone rips off your idea, there is no money involved. Which makes it even worse to act like sell outs!

------------------
"The Rumanians are really the most reliable people in the world when it comes to depending upon their breaking any promises they make." - General Harry Hill Bandholtz, US Army, 22 NOV 1919. General Bandholtz was the one who saved the Crown Jewels from the Rumanians. His statue sits in front of the American Embassy in Budapest.
Truth (http://www.hungary.com/corvinus/lib/genoci/genoci09.htm)

Heresson
May 17, 2001, 07:48
I know. I'm bad.
But if I share my ideas,
no-one will remember they were mine.
It's not quite about the fame,
but if I will be better known,
I won't have problems with getting playtesters.

Though... In fact, most of people are such useless
that... One or two good ones stand for thousands
ordinary. However, sometimes they aren't free,
and what can I do then?

Strange name? I wish to change it, but can't do it
now.

Panda
May 17, 2001, 14:37
Well, if you wanted people to remember you, I think you've just acheived your aim. Congrats! http://apolyton.net/forums/rolleyes.gif

------------------
"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

Henrik
May 17, 2001, 15:15
<center><table width=80%><tr><td><font color=000080 face="Verdana" size=2><font size="1">quote:
<img src="/images/blue1.gif" width=100% height=1>
</font><font size=1>Originally posted by Andrew Livings on 05-17-2001 02:37 PM</font>
Well, if you wanted people to remember you, I think you've just acheived your aim. Congrats! http://apolyton.net/forums/rolleyes.gif

<img src="/images/blue1.gif" width=100% height=1></font></td></tr></table></center>

My thoughts exactly!

Heresson
May 17, 2001, 16:07
hehehe I know.
C-mon.
It is my birthsday today, let me play.

And I have nothing against sharing this and other stuff with everyone.
If I'll receive allowance from one guy, I'll do it in next days.

I don't want to be good. Good means dumb.

Kull
May 17, 2001, 20:58
The only acceptable reason for not sharing a discovery is if it's part of a soon-to-be-released scenario. That does NOT mean one of those vaporware scenarios that exists only in your head or else has been "under construction" since forever. From Allard and his hex-editing document to tool-creators such as Gothmog & Angelo Scotto, the Scenario World is blessed by the presence of countless, selfless individuals.

In the Scenario League, the only coin-of-the-realm is respect. And there's only one way to get it.

William Keenan
May 17, 2001, 23:32
I find it disconcerting when an important thread like this one becomes polluted with the useless babble of an obvious charlatan like Heresson.

Xin Yu
May 18, 2001, 01:09
The problem of civ2 is that the AI is really dumb. In order for the AI to be tough in a scenario, we have to give it half-dozen units for each one a human player kills. Thus, the human player needs to spend a lot of time micromanaging cities and planning movements for every single unit.
For some people, playing civ2 is for fun, not for brain-killing. So they give up after half turn of playing.
For some other people, they passed the brain-killing test and find or learned a trick, and then suddenly realize that, since the AI has too many units and cities, they must use the trick repeatedly in a monotone fashion. These people soon get bored and give up after 10 turns.
Therefore, the only players who can enjoy the scenarios are those who playered without thinking (play as if in a normal civ game). Because the AI is strengthened by the scenario designer, the players will suffer huge losses at the beginning. Those players enjoyed the defeat and praised the designer's plots. Later, the designer's plots turned to the human players' favour and they finally won the scenario.

In order to build a scenario exceeding Nemo's level, we need to make the AI smart while reducing the micromanagement for the human players. For example, after capturing a city, AI units will regroup to that city ('goto'), and after there are enough units there (use a hacker program to get unit counts), they will attack again with a specific target.
<font size=1 face=Arial color=444444>[This message has been edited by Xin Yu (edited May 18, 2001).]</font>

Heresson
May 18, 2001, 07:18
Me charlatan?

BeBro
May 18, 2001, 08:08
Heresson, the community lives from shared ideas. And I believe more people will remember you when they read in the credits of other scns that you had one of the new ideas that are implemented.
Posting a great idea here without revealing it leads only to disappointments. If you will make sure that nobody "steals" your idea, simply post an addition like Polaris did with his units for the secret project, as far as I kow, everyone has respected it.

------------------
Civ2000 (http://civ2000.civ2.gamesweb.de/) hosted by CivII Universum (http://civii.de)

Henrik
June 1, 2001, 02:38
Would it be possible to make a civ allied to the barbarians (untill I break the alliance whit an event)?

Henrik
June 2, 2001, 07:10
Isn't there anyone who can answer my question? :( :scared: :(

SCDARS
June 2, 2001, 08:47
Yes, it should be possible, see Andrew Livings' "Crises of the new world order" (http://apolyton.net/forums/showthread.php?s=&threadid=10382&pagenumber=3):
I also sneakily allied the Allies with the Rogue states via hex-editing because in previous versions the conflict between UN peacekeepers and Rogue units at the start of the game made it almost too easy for the human player to go in next and finish the job. This alliance is invisible, and unbreakable because the alliance is fixed for both sides and can only be broken through negotiation, which you can't do with the Barbarians. It also simulates the role of the UN as a more neutral player - except under your command.
Or, to quote Allard:
byte 37-64 Treaties. 4 bytes for the treaties with all 7 civs (including their own civ).
1st byte: .... ...1 - contact
.... ..1. - cease fire
.... .1.. - peace
.... 1... - alliance (with peace always)
...1 .... - vendetta
1... .... - embassy
2nd byte: ..1. .... - war
.... .1.. - ???? used by game
3rd byte: ..1. .... - ???? used by game
4th byte: ????
then the 1st byte for the next civ, for all 7 civs.

NOTE: You can also combine these values, for example to create a war and an
alliance at the same time. In this example, your units will be repaired when
attacking enemy cities, but in the diplomacy screens the civ will talk with you
as if you were at war. More similar strange effects can occur.

SlowThinker
June 28, 2003, 17:39
This one looks to be newer: Everything about Hex-Editing - UPDATED (http://apolyton.net/forums/showthread.php?s=&threadid=50848)

Boco
March 14, 2004, 22:27
Where can I find a description of the address that control's whether a city can build a hydro plant? Can't seem to find it in Allard's document. This is new territory for me, but it's time to get my feet wet.

Mercator
March 15, 2004, 10:18
It can be done with CivCity though... It isn't mentioned indeed, but it should be one of the missing bits in the 5th, 6th or 7th byte of the city code...

I think I must have the info somewhere, but not on this computer.

Boco
March 15, 2004, 23:26
Not with multimap ToT files. http://forums.civfanatics.com/images/smilies/cry.gif Talk about bait and hook! EA addicted me to CivCity, and now I'm going through severe withdrawal pains. Sigh! I'll just have to placate myself with SpriteGen.

Wobbegongfish sent me the info:It’s the 8th byte of each city entry :b:

Catfish
March 17, 2004, 23:22
Originally posted by Boco
Wobbegongfish sent me the info:
Wobbegongfish? :lol:

'kin' 'ell, I just noticed this. Specifically, it's the 8th byte for ToT, 6th for older versions.

SlowThinker
August 20, 2004, 00:08
In a PBEM how can we make a Ctrl-N for a player that exceeded his time limit? Of course I mean by hexediting.

AGRICOLA
November 14, 2004, 13:58
Sorry, finger troubles.