1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Civ5 Save Analyser

Discussion in 'Civ5 - Utility Programs' started by Dynamic, Oct 21, 2011.

  1. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    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.
     

    Attached Files:

  2. Darsnan

    Darsnan Chieftain

    Joined:
    Sep 12, 2007
    Messages:
    637
    Hi Dynamic,

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

    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
     

    Attached Files:

  3. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    Location:
    Somewhere in the world
    I haven't any mods so didn't check it, but now I see that my program works with standard game only... :(
     
  4. Darsnan

    Darsnan Chieftain

    Joined:
    Sep 12, 2007
    Messages:
    637
    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
     
  5. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    Location:
    Somewhere in the world
    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.
     
  6. FinalSin

    FinalSin Chieftain

    Joined:
    Feb 26, 2006
    Messages:
    6
    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
     
  7. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    Location:
    Somewhere in the world
    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.
     
  8. FinalSin

    FinalSin Chieftain

    Joined:
    Feb 26, 2006
    Messages:
    6
    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!
     
  9. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    Location:
    Somewhere in the world
    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.
     
  10. FinalSin

    FinalSin Chieftain

    Joined:
    Feb 26, 2006
    Messages:
    6
    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.
     
  11. Owls

    Owls Chieftain

    Joined:
    Nov 23, 2003
    Messages:
    11
    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?
     
  12. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    Location:
    Somewhere in the world
    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.
     
  13. Chuckleluck

    Chuckleluck Chieftain

    Joined:
    Aug 12, 2014
    Messages:
    7
    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.
     
  14. hermank

    hermank Chieftain

    Joined:
    Aug 27, 2014
    Messages:
    1
    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.
     
  15. Nougatrocity

    Nougatrocity Chieftain

    Joined:
    Aug 31, 2014
    Messages:
    2
    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!
     
  16. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    7,996
    Location:
    Near Portsmouth, UK
    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
     
  17. Nougatrocity

    Nougatrocity Chieftain

    Joined:
    Aug 31, 2014
    Messages:
    2
    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. :)
     
  18. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    Location:
    Somewhere in the world
    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.
     
  19. RStark

    RStark Chieftain

    Joined:
    Nov 20, 2011
    Messages:
    504
    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.
     
  20. Dynamic

    Dynamic But not hurry

    Joined:
    Feb 22, 2003
    Messages:
    1,131
    Location:
    Somewhere in the world
    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.
     

Share This Page