View Full Version : Game Settings Extractions


ainwood
May 13, 2004, 07:07 PM
I have seen a few requests for getting the world seed out of save games (seeing as the 'play last world' and 'world seed' options were added to conquests).

So I decided to automate this via a utility. The attached utility will allow the user to get the world settings out of C3C, PTW and Vanilla Civ (1.29f only) saves.

Note: To extract the details from non-scenario C3C games, you will need to have conquest installed (so that the utility can read data from the conquests.BIQ file).

Please let me know if you find any bugs (I didn't put overly robust error handling in, and didn't exhaustively test it on all versions and scenarios). You can e-mail me with problematic saves to: gotm@civfanatics.net

Or upload them in this thread. :)

Edit: New version 1.0.2 attached.

Version History:
v1.0.0: Original Release (removed after 230 downloads)
v1.0.1: (removed after 348 downloads)
Fixed problem with mistaken identification of GOTM files.
Fixed problem failing to read base Conquests games.
v1.0.2: Added ability to export settings to a text file.


For those of you who don't want to download the full setup pack, you can instead just download the new .exe. :)

Gogf
May 13, 2004, 08:29 PM
Awesome! I will definately use this, as I want to try the GGF1 map on an actually hard difficulty (emperor for this map). Thanks Ainwood!

Revolutionary
May 14, 2004, 10:15 PM
this utility is great thank you very much :thanx:

:hmm: it doesn't seem to be able to read C3C 1.15 beta saves, it says "failed reading save file"

ainwood
May 15, 2004, 03:04 PM
:hmm: it doesn't seem to be able to read C3C 1.15 beta saves, it says "failed reading save file"Can you send me one please? gotm@civfanatics.net. :)

MarineCorps
May 15, 2004, 03:12 PM
Thank you ainwood this is extremly useful! :thanx: :thanx: :thanx: :thanx:

sabrewolf
May 16, 2004, 06:04 AM
:lol: good tool!

but wierd stuff: i opened an old SP file which i once tweaked a bit to make a 20k-city-victory possible and it game me the error message "surely you wouldn't have thought that you could get GOTM spoiler info by using this utility, would you".
as i don't play GOTM... no, i didn't think ;)

anyway, it seems you criteria for defining GOTM saves are a bit too broad :)

looking especially forward to the trade assist for c3c :)

ainwood
May 17, 2004, 11:38 PM
:lol: good tool!

but wierd stuff: i opened an old SP file which i once tweaked a bit to make a 20k-city-victory possible and it game me the error message "surely you wouldn't have thought that you could get GOTM spoiler info by using this utility, would you".
as i don't play GOTM... no, i didn't think ;)

anyway, it seems you criteria for defining GOTM saves are a bit too broad :)

looking especially forward to the trade assist for c3c :)
Can you send me a copy of that file, please?

sabrewolf
May 18, 2004, 01:24 AM
here it is.

although i usually play emperor level, i thought i had to go back to a lower level to get a 20k city victory. also, i enhanced the city location a bit and moved the starting location. i presume that makes your extractor think it's something else

ainwood
May 19, 2004, 02:47 AM
Thanks!

I've tweaked the check -> in the next version that problem should be gone. :)

handy900
May 21, 2004, 09:19 PM
I got this error message when trying to open a C3C 1.15 file from the HNDY03 - AWE SG. (SG link in sig)
Supposed to be continents, but we are wondering if it's pangaea since the landmass looks funky. Tiny map if that matters. This will be a way cool tool.
Save attached. :D

http://www.civfanatics.net/uploads7/HNDY03_350BC_seed_beast.JPG

ainwood
May 21, 2004, 11:58 PM
Thanks for the save -> it helped me track-down a bug. It is a continents game.

ainwood
May 22, 2004, 12:10 AM
Ok -> New version attached. :) See the top post.

handy900
May 22, 2004, 05:39 AM
Works Great. We are unworthy. :worship:
Is it hard to add AI aggression level, victory conditions enabled, Ai respawm on/off, etc. This is a great SG utility. Thank you! :D

KayEss
May 22, 2004, 06:59 AM
Looks interesting. Is there any chance of doing a C/C++ library or better yet an ActiveX version of this?

Just asking as I've been meaning to get around to building a PBeM management site and this'd be really useful for it to read out turn numbers, game rules, next player etc. information when .SAV files come in.

Ellkol
May 23, 2004, 03:21 PM
Thanks Ainwood! :love:

Question deleted.

Answer: No.



No.




And: oh my god, NO!

Longasc
Jun 06, 2004, 02:40 AM
He ainwood, savior of the map seed seekers! :)

I ask you for a FEATURE - to be able to save the Seed and Settings as a standard plain vanilla .txt file.

This would be really great. It would be worth a small wonder, ainwood's world seed extractor utility -> makes 1 citizen (Longasc) happy. ;)

KayEss
Jun 06, 2004, 05:17 AM
Outputting to a text file would be great (especially if it can be automated) if COM is too hard.

Do Longsac and I have to go in search of a (scientific) great leader to pass on to hurry this one up?

ainwood
Jun 07, 2004, 12:09 AM
Good idea! That one I can do fairly quickly. See the top post. :)

Longasc
Jun 07, 2004, 12:54 AM
Thanks a lot, it works great - and looks like this:

D:\Civilization\Conquests\Saves\Cleopatra of the Egyptians.sav

Barbarians: ROAMING.

Climate: NORMAL.

LandForm: CONTINENTS.

Map Size: HUGE.

Ocean Coverage: 70%.

Temperature: WARM.

World Age: 4 BILLION YEARS.

World seed: 2100160304

PLAYERS:
Egypt (Human player)
Inca
Maya
America
Aztecs
Iroquois
Rome
Greece
France
England
India
Persia
Babylon
Scandinavia
Japan
Byzantines


no more typing - thanks, ainwood! (+1 happy citizen) :goodjob:

sabrewolf
Jun 07, 2004, 01:36 AM
ainwood,
i generated a large map, but with just 8 players (instead of 12). your GSE extracted the information from the game, but it wasn't completely equal. geography was perfectly matching, but starting locations and some resources were different. i presume this comes from the number of players.

so i changed the rules that large has only 8 players... and there... the map was even closer, but still not a match! i then gave up when trying to find the right minimal starting distance between civs. and maybe it's another reason

now my question: do you think it's possible that your tool can extract all data for creating the exact match? what other factors could be infuencing the resource and SL placement?

ainwood
Jun 07, 2004, 02:20 AM
@:sabrewolf:

I'm still looking at that. From the tests I've done so-far, it seems to agree with what you say: map is fine (and so is resource distribution, from what I can tell). Player starting locations seem to be the problem. I've played around with 'redistribute player starting locations' in the editor, and that doesn't seem to fix it either. There is 32 sets of 2 x integers in the relevant WRLD section of the save, and I <thought> they might correspond to the starting x & y, but haven't checked that yet (I was looking at them for a different reason). If this is right, then it will let ths starting positions be extracted from the saves, but they will probably have to be put in via the editor (or perhaps I could automate it into the saves? => player uses the tool to get the game settings, generates the map via the editor, then feeds the .sav back to the tool to set the start locations?)


To summarise: Needs more work! :D

Longasc
Jun 07, 2004, 11:26 PM
It's me again! Happy Citizen Longasc is celebrating WLA-Day! :)

("We love Ainwood") :jesus:

:worship:

sabrewolf
Jun 08, 2004, 01:47 AM
ainwood:
there must be a way to generate it because when starting the _game_ with exactly the same settings and civs, i get the same starting location and the same everything.
from what i remember, the resources weren't completely the same. i remember seeing wheat instead of a luxury and some other things slightly different.

those 32x 2ints probably are enough. i presume your integers are 4 bytes long which would be enough for coordinates (1 byte wouldn't be enough for gigantic world sizes). a very long time ago (at vanilla civ3) someone progammed a starting location "inserter". i presume it's still the same...

but anyway.... great work! hope to this continuing (and especially hoping for a C3C-version of trade assist ;) )

Dianthus
Jun 08, 2004, 02:23 AM
ainwood:
(and especially hoping for a C3C-version of trade assist ;) )
<thread jack>
You could always check out the latest version of CRpMapStat :mischief:.
</thread jack>

sabrewolf
Jun 08, 2004, 03:04 AM
thanks for the hint, i guess i should have a notification on that thread too ;)

ainwood
Jun 08, 2004, 04:05 AM
<thread jack>
You could always check out the latest version of CRpMapStat :mischief:.
</thread jack>

^^ bah! Intellectual property thief :p



@sabrewolf:

Well, I have actually started converting trade assist to conquests. That in itself is no big deal, but I've re-written the entire source code for all civ versions. Main activity has been COTM and GOTM as well as (finally) getting on to the QSC. But I <do> plan on getting trade-assist upgraded (and have a few extra features planned). :)

re the game settings: were you getting the same map by using the settings & world seed in C3C? I was referring to PTW & Civ3 via the editor.

Dianthus
Jun 08, 2004, 04:11 AM
^^ bah! Intellectual property thief :p

True.




... (and have a few extra features planned). :)

Are they new ones that I can blatantly copy, or are you going to get your own back and copy some of mine? :D.

sabrewolf
Jun 08, 2004, 04:34 AM
Well, I have actually started converting trade assist to conquests. That in itself is no big deal, but I've re-written the entire source code for all civ versions. Main activity has been COTM and GOTM as well as (finally) getting on to the QSC. But I <do> plan on getting trade-assist upgraded (and have a few extra features planned). :)

i can imagine the whole stuff isn't too little work ;)

re the game settings: were you getting the same map by using the settings & world seed in C3C? I was referring to PTW & Civ3 via the editor.

yes exactly, it was all C3C.
except one PBEM, i havn't played non-c3c civ since patch 1.12. the new civs and features are just too good to miss out :)

KayEss
Jun 08, 2004, 09:33 AM
Just tried the EXE only (the DLL was missing so I couldn't actually extract anything). Is there any way of doing it so that it can run straight from a command line?

For example:
"Seed beast" "c:\whatever\agame.sav" "c:\whatever\agame.txt"
and just have it make the .txt file?

I've done a prelim design for the game management stuff and may be able to get on and do some specific code for it next month.

Longasc
Jun 08, 2004, 11:54 AM
Such a little tool, and so many wishes. Now I no longer wonder why Windows is updated over and over again. :)

Grunthex
Jun 25, 2004, 10:24 PM
I don't know what I'm doing wrong -- this only works on one set of my games (a game as Carthage) .. on all the others it fails to open the save file.

I tried installing it both to it's default directory, and to the Civ3 directory. I've tried rebooting after installation. What am I missing?

If someone could tell me the seed from the game below, that would be great. If anyone has any ideas why I can't run this, that would be better!

Thanks.

ainwood
Jun 27, 2004, 01:42 PM
I don't know what I'm doing wrong -- this only works on one set of my games (a game as Carthage) .. on all the others it fails to open the save file.

I tried installing it both to it's default directory, and to the Civ3 directory. I've tried rebooting after installation. What am I missing?

If someone could tell me the seed from the game below, that would be great. If anyone has any ideas why I can't run this, that would be better!

Thanks.
What error message are you getting? Seeing as that save is a C3C save, I presume it is asking for the location of your conquests.biq file?

Grunthex
Jun 27, 2004, 05:54 PM
What error message are you getting? Seeing as that save is a C3C save, I presume it is asking for the location of your conquests.biq file?

My bad. Just getting the 'Failed Reading Save File' in a pop-up window. After that the name of the game is at the top (left of the select file button), but the settings window is blank.

ainwood
Jun 27, 2004, 06:03 PM
Have you patched Conquests to version 1.22f (or at least 1.15f)?

Grunthex
Jun 28, 2004, 07:59 AM
Yes, patched up to 1.22. And other than some interface stuff (terrain, borders), no mods installed at all.

ainwood
Jun 28, 2004, 01:47 PM
When you try to load a conquests file, does it ask you to locate the Conquests.biq file manually, or does it go straight to the error message? And does it work with files created since you installed patch 1.22f?

Grunthex
Jun 28, 2004, 03:45 PM
It goes straight to the error message.

I've never played tried it under any pre 1.22 version, I just discovered this program last week. Also, this installations is clean, and all the saves are C3C v1.22.

ainwood
Jun 28, 2004, 11:09 PM
OK. I'll download the one you posted and try it. :)

ainwood
Jun 29, 2004, 04:19 AM
It goes straight to the error message.

I've never played tried it under any pre 1.22 version, I just discovered this program last week. Also, this installations is clean, and all the saves are C3C v1.22.
OK, I tried it on my home PC, and it works fine. Try downloading the full install again from the first post in the thread (it won't work if you try the .exe only).

Anyway, for that save you posted, the details are as follows:

Barbarians: ROAMING.

Climate: ARID.

LandForm: CONTINENTS.

Map Size: LARGE.

Ocean Coverage: 70%.

Temperature: TEMPERATE.

World Age: 5 BILLION YEARS.

World seed: 36176310

PLAYERS:
Greece (Human player)
Byzantines
Babylon
Rome
Hittites
Portugal
Inca
Scandinavia
Korea
Egypt
Germany
Sumeria

Grunthex
Jun 29, 2004, 04:26 PM
Thanks for the results -- I'll give it an uninstall and reinstall from scratch tonight, making sure I use the full version... will let you know how it turns out.

watorrey
Aug 24, 2004, 10:46 AM
How does this determine map size? Does it use the 'World Size' rules the map is using or does it estimate it based on tiles?

A 180x180 map made w/ bmptobic and imported to a biq file shows world size rules of 'Tiny' using Civ3multitool savegame editor. This shows world size as 'Sandard'.

I'm really trying to find an easy way to tell which World Size rules are in effect for a custom map.

ainwood
Aug 24, 2004, 01:21 PM
It reads them out of the WRLD header. This is the value that will be used internally to calcuate such things as the corruption modifier and tech rate modifier.

If you want to post the BIC/BIX/BIQ, then I'll check the actual rules for you - note that it is possible to have the "wrong" world size for custom maps. I found in the COTM that importing a map into the game can set the world size modifiers equal to the size of the last map played; not the imported one.

watorrey
Aug 24, 2004, 02:02 PM
So if i use this utility to check the map size on a 1 turn saved game, that is the world size rules it's gonna use?

That import bug makes all my confusion make sense now. Sometimes it comes up tiny, other times huge or standard. I'll play with it some more till i understand it better.

Can this be modified to check the biq instead of having to start a game?

EDIT: OK... i see the only way around this is to set all the various world sizes the same depending on whatever you want the map to use. That way it doesn't matter what size map was played previously. I tested this approach and it seems to work.

Are map/mod makers generally aware of this problem?

ainwood
Aug 26, 2004, 06:54 PM
I see you've opened a bug report thread about it! :goodjob:

I could get it to read from the biq directly. Might do it if I get time, although might not solve that problem....

watorrey
Aug 26, 2004, 07:06 PM
I see you've opened a bug report thread about it! :goodjob:

I could get it to read from the biq directly. Might do it if I get time, although might not solve that problem....

I asked about reading from the biq before i fully understood the problem. It wouldn't be of any use because even if the info is there, it doesn't use it.

ainwood
Aug 26, 2004, 07:26 PM
I asked about reading from the biq before i fully understood the problem. It wouldn't be of any use because even if the info is there, it doesn't use it.
Re the bug, that's what I figured. :(

However, might be useful for someone wanting to know the settings for a given scenariofile anyway. :)

smphang
Sep 02, 2004, 06:09 PM
sigh...
its me again, ainwood...
out of boredom, i tried using this utility... but seems that this won't extract the seed infos from any of my saves too...
attached is an example.
I am begin to wonder if the culprit is actually my computer, coz i had reinstall conquest, and patched it to 1.22. (btw, the civassist still won't work for me)

ainwood
Sep 02, 2004, 06:12 PM
sigh...
its me again, ainwood...
out of boredom, i tried using this utility... but seems that this won't extract the seed infos from any of my saves too...
attached is an example.
I am begin to wonder if the culprit is actually my computer, coz i had reinstall conquest, and patched it to 1.22. (btw, the civassist still won't work for me)
I'll try it with this save as well. :)

LAW_FREAK
Sep 05, 2004, 06:57 PM
v1.0.2: Added ability to export settings to a text file.
Could you go a step further and make it so that it can add to the .txt file instead of making a new one, so that it could make a list of all my games.
Thanks :goodjob:

ainwood
Oct 16, 2004, 05:03 PM
Ok - I've added a new version to the first post here (http://forums.civfanatics.com/showpost.php?p=1834757&postcount=1). Seems some people were having problems loading saves from some C3C games. Should have fixed that now. :)

plarq
Jan 08, 2005, 04:05 AM
Where's the full pack setup file?I install the one in the first page and it just doesn't work.No setting showed and no save can be read.

plarq
Jan 10, 2005, 02:24 AM
Is my voice so weak?No one knows where's the full pack download?

Dianthus
Jan 10, 2005, 02:59 AM
Is my voice so weak?No one knows where's the full pack download?
I think ainwood is away at the moment. The setup in the first post is the only one I'm aware of. I guess you'll just have to be patient and wait for ainwood to get back and respond to this!

plarq
Jan 10, 2005, 09:26 PM
I think ainwood is away at the moment. The setup in the first post is the only one I'm aware of. I guess you'll just have to be patient and wait for ainwood to get back and respond to this!

Sigh...C'est La Vie.

ainwood
Jan 23, 2005, 01:04 PM
Sorry - I'll have to look on the FTP server to find it (will do that sometime this week).

Otherwise - you can try installing CivAssist and then just trying to run the .exe from this - I <think> they both use the same (shared) DLL...

plarq
Jan 28, 2005, 06:30 PM
Thanks ainwood.But I can't use Civassist either,I installed it and library files,but it still doesn't work.

superslug
Jun 26, 2005, 02:35 PM
Everytime I try to use this program, I get an error saying: Run time error '53', File not found: beast.dll.

ainwood
Jun 26, 2005, 02:56 PM
If you use CivAssit II, and right-click on the world-map view, then you can get the game settings there. :)

superslug
Jun 26, 2005, 07:22 PM
If you use CivAssit II, and right-click on the world-map view, then you can get the game settings there. :)
I'm not seeing it. Was that added after the original version? :blush:

ainwood
Jun 26, 2005, 07:52 PM
I'm not seeing it. Was that added after the original version? :blush:
It might have been added to the version which hasn't been rleased yet.... :blush::blush::blush:

superslug
Jun 26, 2005, 07:56 PM
It might have been added to the version which hasn't been rleased yet.... :blush::blush::blush:
I should still upgrade to the latest release anyway. I'll do so tomorrow and get back to you. :)

vmxa
Jun 26, 2005, 09:37 PM
Whew, because I was not able to do it either.

TruePurple
Jan 30, 2006, 03:19 PM
Would you please make seed beast extract the difficulty level setting? Like if you forgot what you set it at etc.

ainwood
Jan 30, 2006, 04:04 PM
Would you please make seed beast extract the difficulty level setting? Like if you forgot what you set it at etc.
To be honest, I'm not sure if I even have the source code anymore. Try CivAssist II - I think the information is all included in that (somewhere....) :ack: Or if its not, we can include it.