darkpanda
Dark Prince
- Joined
- Oct 28, 2007
- Messages
- 823
I spent quite some time analyzing how CIV.EXE generates random maps, and described the whole thing in this thread. Of course I could not help pushing it a step further So I started to patch the random map generation code in order to spice up the Civ experience a little bit.
This post aims to present several patches to the random map generation process, and will be updated from time to time as new ideas come up. Basically, almost any step of the processs can be patched, but I want to focus on patches that results in significant and interesting changes in the process behaviour.
1. Land mass hack: from Pangea to a thousand islands
This hack patches the land mass distribution, by modifying the maximum path length of random land chunks (see section A.1.1 of ]this post for algorithm details):
In order to change this value, you must patch your CIV.EXE as follows:
Hereunder are 2 screenshots illustrating maximum path lengths of 1 and 65535, when starting a new game with default parameters (1,1,1,1):
Using custom Earth parameters still affects the result, for example using "Small" land size with a big path length will result in a small single continent...
Enjoy !
This post aims to present several patches to the random map generation process, and will be updated from time to time as new ideas come up. Basically, almost any step of the processs can be patched, but I want to focus on patches that results in significant and interesting changes in the process behaviour.
1. Land mass hack: from Pangea to a thousand islands
This hack patches the land mass distribution, by modifying the maximum path length of random land chunks (see section A.1.1 of ]this post for algorithm details):
- originally, Civ chooses a random value from 1 to 64 (included) as the maximum chunk length, which gives the results that we know
- by decreasing this value, Civ will generate shorter chunks, tending to create many small separate islands; the extreme is to make Civ generate chunks of length just 1, resulting in a ton of tiny islands
- by increasing this value, Civ will generate bigger chunks, tending to create a few large land masses; the extreme is to make Civ generate chunks of the maximum possible length 65535, resulting in 1 or 2 enormous continents
In order to change this value, you must patch your CIV.EXE as follows:
Code:
[color=red]Original[/color] hex chain an offsets:
FR 47405: 0003618dh: 04 56 B8 [color=red]40 00[/color] 50 9A
EN 47401 and 05: 00034d8dh: 04 56 B8 [color=red]40 00[/color] 50 9A
[color=blue][b]Patched[/b][/color] hex chain:
FR 47405: 0003618dh: 04 56 B8 [color=blue][b]xx xx[/b][/color] 50 9A
EN 47401 and 05: 00034d8dh: 04 56 B8 [color=blue][b]xx xx[/b][/color] 50 9A
replace [color=blue][b]xx xx[/b][/color] above with the value of your choice written
as a little-endian hexadecimal 2-byte word; for example:
1 = [color=blue][b]01 00[/b][/color]
64 = [color=blue][b]40 00[/b][/color] (original CIV value)
12345 = [color=blue][b]39 30[/b][/color]
65535 = [color=blue][b]FF FF[/b][/color]
Hereunder are 2 screenshots illustrating maximum path lengths of 1 and 65535, when starting a new game with default parameters (1,1,1,1):
Using custom Earth parameters still affects the result, for example using "Small" land size with a big path length will result in a small single continent...
Enjoy !