Civ5 Save Analyser

Dynamic

But not hurry
Joined
Feb 22, 2003
Messages
1,139
Location
Somewhere in the world
Hi All!
I've made a simple *.Civ5Save analyser for viewing log and graphics. It works with any saves, not final only. Maybe it will be helpfull for somebody.

Note! I haven't made any protection for data that don't available for player at current game stage (you can see all civs and their graphs).
This version 1.06.1 should read all saves till 1.0.1.383 with all civilization-DLC.

For scaling graphs you can select any area on the graph by mouse movig coursor from Up-Left to Down-Right with pressed Left Button. Scaling is repeatable. For returning to the full scale use any Down-Right to Up-Left selecting.
You can move the graph to any direction by mouse with pressed Right Button.

There is a limit for civ-colors on the graphs - just 25 because of too small difference between them. Civ5 allows up to 64 Players+AI+CS, so if you have more then 25 of them you should manually select only part of the list.

I've used old version of Delphi for designing, so it could be minor graphic troubles on Win7. :(

Update 29.07.2015 (up to Civ5BNW 1.0.3.279 without Mods and Scenarios): Civ5SaveAnalyser 1.22.0.
 

Attachments

  • Civ5Save1061.zip
    612.3 KB · Views: 2,163
Hi Dynamic,

I'd posted a similar thought yesterday over in another mod forum:

To segue a bit here, a thought I had today regarding giving the AIs a “memory” of how to play in certain environments would be to create individual store files on Steam that held certain information. Say each file held the map type, AIs involved, proximity of each AI to the human player, game difficulty, AI power ranking (sampled throughout the game), Victory condition chosen, and human players’ skill level, and these store files were in place for each map type, game difficulty, and AIs involved. Since thousands and thousands of games would be played (and each of the game results would be uploaded to the individual store files), then even though there would be hundres of such files on Steam, the store files would be populated very quickly with game results. Then at the beginning of a game when a human player chooses the AIs, the AIs are then able to poll this online data and determine that given its starting position (map setup, difficulty level, experience of human, and proximity to human player), then choosing Victory condition X was proven statisitically more advantageous.

Sort of datamining the AIs, which is one of the things your tool does nicely! :goodjob:

I tried to run this on both my Vista and Win 7 machines, and I get the error message noted in the pic when I try and load mod saves. Should your tool work with mod saves as well?

D
 

Attachments

  • Save Analyzer error message.jpg
    Save Analyzer error message.jpg
    36.6 KB · Views: 1,560
I tried to run this on both my Vista and Win 7 machines, and I get the error message noted in the pic when I try and load mod saves. Should your tool work with mod saves as well?

I haven't any mods so didn't check it, but now I see that my program works with standard game only... :(
 
That's too bad, as I think this would be an extremely handy tool for anyone modding civs and wanting to see how they perform. Or even people who are modding the environmental parameters and want to track how various AIs do in the new environments.

D
 
That's too bad, as I think this would be an extremely handy tool for anyone modding civs and wanting to see how they perform. Or even people who are modding the environmental parameters and want to track how various AIs do in the new environments.

The main problem is lack of source code like Civ4 SDK. So I have to guess what is the real save structure... And I can work with my saves only but I don't use any mods.
 
Hey!

This thread is really old and you have no contact info listed so this might be in vain, but... Your tool is really cool. I wish it was up to date with the latest versions of Civ V! Would you consider releasing the source code?

FS
 
Hey!

This thread is really old and you have no contact info listed so this might be in vain, but... Your tool is really cool. I wish it was up to date with the latest versions of Civ V! Would you consider releasing the source code?

FS
Hi!
You can try this: Civ5SaveAnalyser 1.17.2
It works for Civ5 Vanilla and GAK without Mods and Scenarios.
There are some empty fields in this program - I just didn't make its functionality.
All this features was made without SDK access but now I have no time to improve it.

P.S. In this version there is faith calculation error for Celts - it doesn't count Forests Faith. Will be corrected soon.
P.P.S. Happiness for AI Players is also incorrect - will be corrected after SDK analysing.
P.P.P.S. There are Hints for accumulated and current GP points in the city - just move coursor over it.
 
Thank you so much!

Can I ask how you managed to do this without the SDK or anything? Did you guess the format? Does it follow previous Civ/other videogame formats? I really would love to extract as much info as possible from the savegames.

Thanks again!
 
Can I ask how you managed to do this without the SDK or anything? Did you guess the format? Does it follow previous Civ/other videogame formats? I really would love to extract as much info as possible from the savegames.
I just compared two saves with small difference again and again. After that I associated these changes with game and understood where these data are placed and what does it means. Of course, it isn't very productive, but it's possible.
Previously I have made same analyser for Civ3 and Civ4 so I have experience and some fields have the same purpose. Compression method is also the same as in Civ4 saves.
 
Ah, that's a great idea! Okay. I'll definitely take a look.

I really wanted to extract things like map data, historical events, locations of cities and so on. I had thought I could write a tool that lets you export the data in-game using the SDK, but it seemed like a lot of work.

Really wish the save files were more open. Thanks for your help so far.
 
From where in the binary are you getting the cities locations? I just want to try to edit and see if I can move a city to a different location of the map. Anyone knows if this is possible?

Basically what I want to accomplish is the following. Since there are no TSL in multiplayer, is to edit a savegame of the game I am playing with my friends. We are using a large Europe map and we want to have every civ start in their corresponding locations. So my idea was to save after the first turn, and then try to edit the savegame file to move all the cities locations to their respective TSL. Is this possible?
 
From where in the binary are you getting the cities locations? I just want to try to edit and see if I can move a city to a different location of the map. Anyone knows if this is possible?

Basically what I want to accomplish is the following. Since there are no TSL in multiplayer, is to edit a savegame of the game I am playing with my friends. We are using a large Europe map and we want to have every civ start in their corresponding locations. So my idea was to save after the first turn, and then try to edit the savegame file to move all the cities locations to their respective TSL. Is this possible?
For editing any save data you should know how CRC is calculated. I don't know. May be modding civ could allow you to change such parameters.
 
I know this thread is super old, but is there any way this could be open-source? I have a project that requires deciphering the save game files, and it would save me a huge headache to have something else to go off of instead of trial-and-error.
 
Yeah ... I was hoping to put some stats from our Civ5 Pitboss game up on server somewhere (unless I'm mistaken and there IS a civstats-like solution for Civ5 as well?).

Would be great if I could just send some XML off to a Webservice somewhere.
 
Ooh, I third the motion for source code!

My end goal is analyzing as much data on a playthrough of a Civ V as I can get - tracking city/civ attributes over time to concretely compare strategies. I think reading autosave files is the easiest way to achieve that. If we can't get source code for this, I'll gladly dig in with anyone else - many hands makes light work!
 
A lot of the source code for the format of the save game files is in the public domain - as the format for objects such as cities, units, players, etc, etc, etc is in the C++ code in the SDK
 
I have the SDK already, (and followed your Civ XML / Wales demo walkthrough - awesome; thanks!) but I have no idea how to use the SDK to examine Civ V assets, let alone determine which are relevant. I'm very o__O.

EDIT: Looks like your DLL Tutorials sig link is a good place to start. I've got my work cut out for me. :)
 
I very rarely do somthing with this program so SaveAnalyser isn't a solid utility and it doesn't work right in all cases, especially for BNW. Some places in the save I found not by parse but by stable parts of the garbage data. So I doubt that code could be useful for other uses...
Civ5SaveAnalyser 1.21.6.
 
Hello guys,


I would like to add a small step-by-step guide for using "Civ5SaveAnalyser 1.21.6" to cure hotseat savefiles to get rid of garbage (redundant) data:

Step 1. When you launch this version of the save analyser utility, it looks like this:
Spoiler :

Press "Load File" and specify the path for your hotseat (GMR) save file.

Step 2. Then press "Load It" button.
Spoiler :


Step 3. Go to "Reloads" tab. The field "Cancer size" indicates the size of garbage data found by the utility in this save file.
Spoiler :

If it is not equal to zero, then you should press "Cure" and provide the name for new cured save file.
Spoiler :


Step 4. Repeat steps from 1 to 3 on obtained save files untill the cancer size is not equal to zero.
In my case, I have to do four iterations to fully dispose of the garbage data.
Spoiler :

Spoiler :

Spoiler :

Spoiler :


This activity may help in avoiding game crashes when loading hotseat (GMR) save files.
 
Using "Load It" button isn't necessary. "Load File" is enough.
"Load It" was designed by request of one user for work with his external program. It inserts civ5save path to the path-field automatically and then send comand to press "Load It".
However, you can use "Load It" for multiple curing civ5save if you don't change the file name in save dialog.
 
Top Bottom