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

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Hans Lemurson
Veteran
Posts: 85
Joined: Mon Aug 22, 2016 10:25 pm

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

Postby Hans Lemurson » Sun May 27, 2018 12:01 pm

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.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!

User avatar
XYZ
Hardened
Posts: 269
Joined: Fri Jan 31, 2014 12:00 pm

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

Postby XYZ » Mon Jul 02, 2018 6:49 pm

http://forum.freeciv.org/f/viewtopic.php?f=14&t=809

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

Hans Lemurson
Veteran
Posts: 85
Joined: Mon Aug 22, 2016 10:25 pm

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

Postby Hans Lemurson » Mon Jul 02, 2018 11:57 pm

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.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!

User avatar
vodot
Veteran
Posts: 79
Joined: Thu May 17, 2018 4:54 pm

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

Postby vodot » Fri Jul 13, 2018 6:31 pm

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".
Last edited by vodot on Mon Jul 30, 2018 5:47 pm, edited 3 times in total.

Hans Lemurson
Veteran
Posts: 85
Joined: Mon Aug 22, 2016 10:25 pm

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

Postby Hans Lemurson » Mon Jul 30, 2018 7:00 am

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.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!

User avatar
vodot
Veteran
Posts: 79
Joined: Thu May 17, 2018 4:54 pm

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

Postby vodot » Mon Jul 30, 2018 5:42 pm

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.
Attachments
Rules.txt_to_FC_converter.zip
(28.81 KiB) Downloaded 11 times

madmax
Posts: 40
Joined: Sun Mar 26, 2017 5:34 pm

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

Postby madmax » Wed Aug 01, 2018 8:27 am

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".

User avatar
vodot
Veteran
Posts: 79
Joined: Thu May 17, 2018 4:54 pm

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

Postby vodot » Wed Aug 01, 2018 4:37 pm

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...