How to migrate custom nations from 2.6 to 3.0 ?

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
Gavroche
Posts: 24
Joined: Wed Dec 26, 2018 8:52 am

How to migrate custom nations from 2.6 to 3.0 ?

Post by Gavroche »

Hello there,

Having upgraded my Debian from 11 to 12, I find that Freeciv has been upgraded from 2.6 to 3.0. So far so good, I've been able to load a saved game and finish it. Except that my three handcrafted custom nations (Elbonia, Westeros and Paris) did not come along, nor, of course, the few tricks that I had inflicted on other nations.

So, I created a `3.0` folder in my `~/.freeciv/` and `default, flags, misc` and `nation` therein. Then I filled the new directories with the content of the old ones, one by one. The client lauches ok, except when `misc` isn't empty. When `mist`is empty, the client launches ok, I can pick my custom nations, except that they don't have their flags and shields. (Instead: baby blue field with three fat question marks).

For what it's worth, let's remember that in 2.6 `misc` used to hold files such as `flags.spec` in which were lines like `"f.elbonia", "flags/elbonia"`

Can anyone tell me

- whether I'm in the right place or should I try in the "Rulesets and modpacks" section ?
- what I should do next to bring my imaginary but dear nations back in the game ?

Thanks
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: How to migrate custom nations from 2.6 to 3.0 ?

Post by cazfi »

Gavroche wrote: Sun Jun 18, 2023 7:43 pmSo, I created a `3.0` folder in my `~/.freeciv/` and `default, flags, misc` and `nation` therein. Then I filled the new directories with the content of the old ones, one by one. The client lauches ok, except when `misc` isn't empty.
The basic question: What's the error message? You may want to launch the client from terminal/console to see its output.

Likely it's just that you are copying 2.6 format files and not updating them to 3.0 format. For any file that originates from freeciv distribution, I recommend that you take the 3.0 file from the installation, do your local modifications, and then place them under ~/.freeciv/

(It should be possible to add local nations by "overrides" mechanism described in doc/README.nations, but that has issues rendering it practically useless in 3.0 - fixed in 3.1)
Gavroche
Posts: 24
Joined: Wed Dec 26, 2018 8:52 am

Re: How to migrate custom nations from 2.6 to 3.0 ?

Post by Gavroche »

> The basic question: What's the error message? You may want to launch the client from terminal/console to see its output.

Code: Select all

gavroche@machine:~$ freeciv-gtk3.22
1: "/home/gavroche/.freeciv/3.0/misc/flags-large.spec": spec file appears incompatible:
1:   datafile options: +Freeciv-2.6-spec
1:   supported options: +Freeciv-3.0-spec
0: Specfile /home/gavroche/.freeciv/3.0/misc/flags-large.spec has incompatible capabilities
gavroche@machine:~$ 
Also, for what it's worth:

Code: Select all

gavroche@machine:~$ freeciv-server
This is the server for Freeciv version 3.0.6
(all other output seem normal and healthy)
> you are copying 2.6 format files and not updating them to 3.0 format

Indeed I do. The question is thus what shall I do to update them to 3.0 format,

I am not sure that I get the sentence "For any file that originates from freeciv distribution, I recommend that you take the 3.0 file from the installation, do your local modifications, and then place them under ~/.freeciv/". Those three custom nations of mines are entirely original and described by three series of files (.ruleset, .png, .spec and so on), carefully handwoven and that have played nice since 2.4, nonwithstanding the occasional upgrade hiccups like the present ones.
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: How to migrate custom nations from 2.6 to 3.0 ?

Post by cazfi »

Gavroche wrote: Mon Jun 19, 2023 3:18 pm > The basic question: What's the error message? You may want to launch the client from terminal/console to see its output.

Code: Select all

gavroche@machine:~$ freeciv-gtk3.22
1: "/home/gavroche/.freeciv/3.0/misc/flags-large.spec": spec file appears incompatible:
1:   datafile options: +Freeciv-2.6-spec
1:   supported options: +Freeciv-3.0-spec
0: Specfile /home/gavroche/.freeciv/3.0/misc/flags-large.spec has incompatible capabilities
gavroche@machine:~$ 
I am not sure that I get the sentence "For any file that originates from freeciv distribution, I recommend that you take the 3.0 file from the installation, do your local modifications, and then place them under ~/.freeciv/". Those three custom nations of mines are entirely original and described by three series of files (.ruleset, .png, .spec and so on), carefully handwoven and that have played nice since 2.4, nonwithstanding the occasional upgrade hiccups like the present ones.
Well, you get the failure about "flags-large.spec" being 2.6 format instead of 3.0. I assume that the only change you've done to that file, compared to the version that freeciv comes with, is addition of your own nations. If that's the case, just copy "flags-large.spec" from your freeciv-3.0 installation, and add references to your nations there.
Likely you have the same issue with other .spec files listing flags.

Edit: If you have other changes there, the more advanced advice is that you should use 'diff' between plain freeciv-2.6 flags-large.spec and your modified 2.6 file to create a patch, and then to use 'patch' to apply that patch on plain freeciv-3.0 file.
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: How to migrate custom nations from 2.6 to 3.0 ?

Post by cazfi »

Also, needed .spec file updates in a general tileset update case: https://www.freeciv.org/wiki/How_to_upd ... 2.6_to_3.0
Gavroche
Posts: 24
Joined: Wed Dec 26, 2018 8:52 am

Re: How to migrate custom nations from 2.6 to 3.0 ?

Post by Gavroche »

Thanks a lot for your patience. Your advice led me to notice something that I had overlooked : the line

Code: Select all

options = "+Freeciv-2.6-spec"
at the very top of each ~/.freeciv/n.m/(flag|shield)(-large).spec

Changing that to …3.0… makes everything ok. :P

Incidently, I also found

Code: Select all

/usr/share/games/freeciv/override/flags-large.spec
which contains only

Code: Select all

; This is intentionally empty file. The idea is that the user can
; override this one with another file with the same name containing
; customizations (additional nations) earlier in freeciv data path.
That may hint to another way to do things.
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: How to migrate custom nations from 2.6 to 3.0 ?

Post by cazfi »

Gavroche wrote: Wed Jun 21, 2023 7:18 pm

Code: Select all

; This is intentionally empty file. The idea is that the user can
; override this one with another file with the same name containing
; customizations (additional nations) earlier in freeciv data path.
That may hint to another way to do things.
That's the override mechanism I mentioned earlier:
(It should be possible to add local nations by "overrides" mechanism described in doc/README.nations, but that has issues rendering it practically useless in 3.0 - fixed in 3.1)
Post Reply