civ3sat - Reads world seed and more

Puppeteer

Emperor
Joined
Oct 4, 2003
Messages
1,687
Location
Silverdale, WA, USA
Civ3 Show-And-Tell

Civ3 Show-And-Tell reads `sav` and `biq` files from Civilization III Conquests and Civilization III Complete v1.22. It can:

- Show world seed and map settings needed to regenerate the same map
- Decompress a `sav` or `biq` file
- Hex dump the file data, automatically decompressing if needed

Other features are in development such as:

- Generating maps viewable in a web browser
- Reports on other game information

Binaries

- Windows 386
- MD5 D97D5C5F69EB7D6609EDEAC60FE7880B
- SHA1 4DB6DDB1B98A904ADD0CCCFFFCA9C505F5357758
- SHA256 45AAE4A14A900CE4A3C9E93957215575449DB281D8AC05680A0DF7D65DC5F961
- Linux 386
- MD5 EDD80CA17BB2C72F319835D5BAFA4669
- SHA1 914D7FB868C14118BF33C488C01CF9FEC692D418
- SHA256 147587A323441F424DEF73A8DE7E7C54F8DAEA5F07ED6282D983DD1C451DCB41
- Darwin/Mac 386
- MD5 8B5A5742EC2FB2E8A33D01FC988DB30C
- SHA1 00091CAB05EEA445CBFE329EAEC5C428CEAD366B
- SHA256 8D6DCB256082B62B3339C722E238AFA2594E6001E213C710999E21F056A40D70

Use

Code:
> .\civ3sat.exe
NAME:
Civ3 Show-And-Tell - A utility to extract data from Civ3 SAV and BIQ files. Provide a file name of a SAV or BIQ file after the command.

USAGE:
civ3sat.exe [global options] command [command options] [arguments...]

VERSION:
0.3.1

COMMANDS:
	seed, s        Show the world seed and map settings needed to generate the map, if this map was randomly generated.
	decompress, d  decompress a Civ3 data file to out.sav in the current folder
	hexdump, x     hex dump a Civ3 data file to stdout
	help, h        Shows a list of commands or help for one command

GLOBAL OPTIONS:
--help, -h     show help
--version, -v  print the version

The following example runs the `seed` command against a save file. To generate the same
map you must use all the choices in the "choose your world" screen as shown in
the Choice column when starting a new game. The Result column shows the end
result which is only different if the original generator chose random.

Note that world size behaves differently. If a map was generated with random
world size, and you want to recreate it, you have to choose the resulting map
size or else the map may be different.

Code:
>civ3sat.exe seed "C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization III Complete\Conquests\Saves\Auto\Conquests Autosave 4000 BC.SAV"

Setting         Choice          Result
World Seed      156059380
World Size      Huge
Barbarians      Random          No Barbarians
Land Mass       Random          Archipelago
Water Coverage  Random          70% Water
Climate         Random          Arid
Temperature     Random          Warm
Age             Random          3 Billion

Source code on GitHub
 
Puppeteer, this sounds very interesting. :):thumbsup:

Is it possible with this tool to read out the world seed of - let´s say - a premade earth map in a scenario and to start a generic game on such an earth map if the game size has the proper dimensions of the earth map?
The next version of CCM will have a modified main file, so this seed could be used for setting up an earth map for a game with the dimensions of such a map as one of the possible settings of the world size.

Does your tool also reconstruct starting locations of civs on a map?
 
Thanks!

Is it possible with this tool to read out the world seed of - let´s say - a premade earth map

To the best of my knowledge that is not possible. The world seed only works for regenerating maps that were generated randomly in the first place, which is most or all epic game maps. If the map was at any point hand-edited then by definition there is no true random seed. In one of the LK SG world map save games I'm using for testing, the world seed is 0 which isn't really a seed at all.

This would be more for "hey I really liked this epic random map I just played and want to play it again; how do I do that?"

The next version of CCM will have a modified main file, so this seed could be used for setting up an earth map for a game with the dimensions of such a map as one of the possible settings of the world size.

I'm not fully understanding your meaning. If you have a premade map in a biq file, you can start a game based on that map. What are you wanting to do differently?

Does your tool also reconstruct starting locations of civs on a map?

So far my tool is only pulling info from the save. It is built into the game that if you use the same world seed and same "choose your world" settings (with minor caveat for world size) you'll get the same map including terrain, resources and starting locations.

So yes, the starting locations are the same, *but* I have noticed that on downloaded saves when regenerating a map I may end up at a different starting position than the original player. (A position that an AI had in the original save, so locations same, my start different.) I have not noticed this on my own saves. I haven't investigated much, but I am presuming that whether or not you choose random civ versus a chosen civ might make the difference.

Based on my understanding of how PRNGs (pseudo-random number generators) work and my observations of the game, when you provide a seed--or it makes its own--a series of random choices are made in the same order. Somewhere in that order all the terrain, starting locations and resource locations are decided. In my experience the randomly chosen opponents are different, but now that I think about it, if the settings on the "player settings" screen are set the same then you should get the same opponents in the same locations, too, I would think. I hadn't thought of that. Come to think of it, if you were to use the same seed, same world settings, same player settings and made the exact same moves you should be able to replay the exact same game with the exact same results. (Only if "preserve random seed" is enabled.)

However, all that said, it may eventually be possible for me to write biq and sav files in which case manipulating things outside of current game and editor abilities is doable in theory. Copying maps while preserving or changing aspects of it may be possible.
 
I'm not fully understanding your meaning. If you have a premade map in a biq file, you can start a game based on that map. What are you wanting to do differently?

The idea was the following:

The epic game starts with random maps in five sizes (that can be set) and influencing random maps with a map seed is possible. Now I can set per example four of the possible five worldsizes for the main-biq to normal settings and name the fifth option for a worldsize "Worldmap" and give it the dimensions of the worldmap (per example if I want to have a 362 x 362 worldmap I set the 5th size to 362 x 362 and then the player can put in the seed for that worldmap and can play the epic game on that worldmap).

This methode would allow the player to choose for the epic game between 4 sizes of random maps or to play on the worldmap. If the main-biq would be combined with a map, the player must play his epic game always on that worldmap.

As far as I understood your answers, at least at present this is not possible as this would need the seed of the worldmap for constructing that worldmap in an epic game.

Puppeteer, thank you very much for your answers and keep up your interesting working. :)
 
Ah, I see. Yeah I don't think that's possible without altering the main .exe like Antal1987 did.

Now that you mention it, it could be interesting to have a 3rd-party game starter to allow these kinds of decisions, but it's a distant possibility, and hooking into the game's map generator for random maps isn't something I'm sure can be done. Maybe someday...

Thanks for the interest!
 
Top Bottom