Page 1 of 1

Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Sun May 27, 2018 12:01 pm
by Hans Lemurson
I was checking out Civ2 again recently, and decided to revisit my fond memories of the WW2 scenario. It's a fun romp as the Axis, but it becomes quickly apparent that the Civ2 AI suuuucks. I then had an idea "What if I could play this scenario against the FreeCiv AI?"

Do you know if there is any utility that can convert a save or scenario file from Civ2 to one that FreeCiv can use? I'm not particularly concerned with Rulesets (although there is a strict Civ2 one, I hear), I just want to avoid having to copy all of the terrain/resources/cities/units by hand.

Are there any utilities that can do this? I'm not sure my coding skills are quite up to parsing the Civ2 save files myself.

Re: Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Mon Jul 02, 2018 6:49 pm
by XYZ
http://forum.freeciv.org/f/viewtopic.php?f=14&t=809

Well, its not WWII but WWI... Did you check it out?

Re: Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Mon Jul 02, 2018 11:57 pm
by Hans Lemurson
XYZ wrote:http://forum.freeciv.org/f/viewtopic.php?f=14&t=809

Well, its not WWII but WWI... Did you check it out?

Oh, I've definitely checked out your WW1 Europe map. I just want to be able to transfer Civ2 scenarios mostly for nostalgia's sake.

Re: Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Fri Jul 13, 2018 6:31 pm
by vodot
EDIT: I made lots of bad assumptions in this post, as I later discovered, especially after reading this old apolyton thread, in which some of the things I decry as nonexistent and impossible below are (or once were) shown to be not only possible but extant indeed.

Short answer: No way.

Longer answer: Definitely not an entire scenario, but parts of some components (Map, Art) would be theoretically extractable via some (currently nonexistent) conversion program.

Long, Long answer:
Hans, this is a hurculean ask. There are no utilities currently that can do this. It's probably completely possible to convert a Civ2 Scenario into Freeciv with 90%+ fidelity, but it would be entirely manual with (maybe) 2 partial and potential exceptions:

1. The (raw) Map
Raw (underlying terrain) maps should theoretically be extractable by a program, since both engines use text with letters in an array to store underlying map terrain. You would already have to have the ruleset and art complete for freeciv to interpret the map correctly, of course, which brings us to...

2. The Art
Art is easy enough to convert manually- to harvest art from a Civ2 scenario requires only rudimentary GIMP or Paint.net skills. To do it automatically, however... might sort of work in some cases (like units and cities.. maybe terrain) but not in many others (extras, effects, etc) which are bundled awkwardly vs. Freeciv or even hard-coded to the Civ2 engine. In the case of units, which are always located on a grid, freeciv can already read those files natively- you would simply have to convert the Civ2 image's pink & purple diamonds to transparency, then find and map the grid's XY dimensions onto a freeciv units.spec... but you'd still have to rebuild the spec file itself manually to map the units.

Nations, Events, Effects, Rulesets (e.g. the guts) would have to be 100% manual, or else would require thousands of hours of coding a converter. At least you could copy-paste any text!

After all that is done... THEN the save file itself/map positions data would probably be easy enough to import via program... but it still wouldn't be trivial.

This is a really rosy picture I'm painting, isn't it?

I get the question, though, since some open source projects are 'engine reimplementations only' that, from the outset, make reading the retail game's asset files a design goal (or requirement) (OpenMW, OpenXCOM...)- but Freeciv isn't like that. It is a complete redesign (Engine and asset structure) that arrives at a game that plays similarly to Civ2... but there's little commonality under the hood, except high-flying concepts like "use rulesets to define rules" and "use sprite sheets and spec files to define art".

Re: Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Mon Jul 30, 2018 7:00 am
by Hans Lemurson
What I was really after is copying the MAP. Trying to duplicate every Tile (which I succeeded at), every City (which I partly succeeded at) and every Unit (which I barely attempted yet) is an incredibly tedious and time consuming task. Automate that and 90% of the work is done.

FreeCiv already has a "close enough" ruleset, that I'm not worried about copying that over exactly. Modifying rulesets and scenario properties is fine.

Copying graphics, I don't care about that much. If I wanted to, I could make a Civ2 isometric graphic set, but I'm not that committed to replicating the aesthetic experience, mostly just the Strategic experience.

In my searching, I did come across the information that would be necessary to import the map data: http://civ2.mercator.fastmail.fm//refer ... truct.html

It's a non-trivial task to implement something that can read that, but not impossible. I'll need to practice simpler coding before contemplate attempting that.

Re: Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Mon Jul 30, 2018 5:42 pm
by vodot
You know what, Hans, I ran my mouth off about how impossible this would be and then I found this old thread on Apolyton. Guy converts a mongols scenario to freeciv, and it actually started up. No clue what version he was playing with, but modifying this to work with 2.6 has GOT to be way easier than starting from scratch.

Not only is there a map converter mentioned but a rules.txt converter(!!) as well. I've attached the rules.txt converter (somehow the download is still active, no clue about license/permissions), but the map converter link is broken. Maybe cazfi knows where to find it today? He was on the thread way back in 2006.

Re: Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Wed Aug 01, 2018 8:27 am
by madmax
Having found that, you were just a search away from the map converter: https://github.com/evyscr/civ2mp2fc
A recent commit is titled "Updated to freeciv 2.5".

Re: Is there a Utility to convert Civ2 saves/scenarios to FreeCiv?

Posted: Wed Aug 01, 2018 4:37 pm
by vodot
madmax wrote:Having found that, you were just a search away from the map converter: https://github.com/evyscr/civ2mp2fc
A recent commit is titled "Updated to freeciv 2.5".


Dude!! Awesome. Time to experiment...