Reading Civ5Replay files (update: HTML export!)

Note that, in the game, you can save the map independently of saving the game itself.

Might this be helpful in figuring out a way to overlay the replay onto the correct map?
 
Awesome work danny! Thanks! I hope Firaxis actually finishes this feature in a patch so we don't have to rely on the community to get it done for them.
 
I just tested it on a regular Earth map game and works wonders. I have another save from a huge earth map with marathon settings on at home. Ill try on that later and see if it all goes well as well.

Really nice thing u got going there!!! Kudos!
 
Note that, in the game, you can save the map independently of saving the game itself.

Might this be helpful in figuring out a way to overlay the replay onto the correct map?

I have to look into it, I completely forgot about that. :) At least the pre-made maps that ship with the game are much simpler than save games.

I've had some success with my save games too, though. Not quite there yet, but it works for some of my very early save games. On the other hand, it will never be as reliable as reading map files.


I just tested it on a regular Earth map game and works wonders. I have another save from a huge earth map with marathon settings on at home. Ill try on that later and see if it all goes well as well.

I suspect it will at least be very slow because the animation javascript is really inefficient :)
 
The finish was the most dissapointing finish I've ever seen. I enjoied the ending of Ice Climber on NES more...:mad:

Dude, that ending was AWESOME!

But yeah, I'm super-excited to see something like this. Civ victories have always made me feel kinda empty, since they take so long and end so suddenly, and Civ V is definitely the most underwhelming in this department, unfortunately. At least they were smart enough to make the replay files, even if they don't support them yet. I can't imagine they'd do that without intending to add it to the game eventually. It probably just hit the cutting floor as they got closer to release. In the mean time, Civ's ultimate mod community is really doing an awesome job picking up the pieces like this. Kudos!
 
What happened to my CIV? What are these ugly replays?


Nice work getting them to work, though. Thanks.
 
Many Thanks dannythefool !

Your Python code is very cool :thanx:

I translated it in french with UTF-8 support for french save on Civfr
 
I've just uploaded a new version that improves a number of things and doubtless breaks some others...

What happened to my CIV? What are these ugly replays?

If they are ugly, that's entirely my fault :) The replay files only contain data, no graphics. But I think I've improved it somewhat now.


I translated it in french with UTF-8 support for french save on Civfr

Thanks, that's way cool!

I read in your thread on your French forum that you have replay files that didn't work (or at least that's what I think I read) - would you mind sending them to me by e-mail? My address is in the script.

Also, I included your translation in the new version of the script. In theory, you can now add " -l fr" to run the script in French mode. But as I don't have any French replay files, I can't guarantee anything - if you could try it out, that would be great.
 
I'm so happy for this, and the work you've done... will you trade open borders with me? What if I throw in some Dye?
 
Danny: I'll look into making this a web service over the weekend if you don't mind?
 
Danny: I'll look into making this a web service over the weekend if you don't mind?

I don't mind, I'm happy if I don't have to host it myself :D

Note that I can't vouch for the security of running this on a web server. At least, I'm pretty sure that someone who's good with a hex editor can get arbitrary HTML into the output of the script. (This is a non-issue if you only let people download the HTML and don't host it yourself. If you want to host all the HTML output, make sure it's not on a domain that would let javascript embedded in it access any cookies etc.)
 
if you could try it out, that would be great.

Thanks dannythefool :goodjob:

I will try the new version this week-end and i send you a french save after that.

Great Job !

-------

Edit for security in php we can strip tags by :
$sString = preg_replace ('@<[\/\!]*?[^<>]*?>@si', '', $sString);

or by :
$sString = strip_tags ($sString);

I dont know for Python how to add that in the parsed content.
 
Wow! Even better! I hope 2KGames takes this feature and credits you in a future update.
 
Too bad that modbuddy browser does not work well with this as well ( no map ,just the event list :( ). Otherwise you could simply pass the python code to lua ( lol, as if passing code in one language to other was a trivial task :D ) and it would be a nice adition to ModBuddy features...
 
Top Bottom